Hacker News new | past | comments | ask | show | jobs | submit login

The grep version searches the input for "foobar" [1]. Hence, it doesn't solve the problem.

[1] https://github.com/benhoyt/countwords/blob/eb2a8adf21c895907...




Thanks! I think he should make that a lot clearer in the "results" table.


Thanks for the feedback. I was trying to make that clear with "grep reference", but you're right, it's still ambiguous. I'll add a note to clear it up. Both "wc" and "grep" don't solve the problem, they're just comparisons to see how fast other programs can read the input (and in wc's case, tokenize into words). For grep, I'm using "grep foobar".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: