4 ms·
What are the "grep" and "wc" lines doing in the results? I can't find them in his git repos. Does he have a solution for the problem using grep, or is he just
by rtb 6y ago
What are the "grep" and "wc" lines doing in the results?
I can't find them in his git repos.
Does he have a solution for the problem using grep, or is he just including "grep x <input" as a reference point for how fast you can read a file?
- fmos 6y agoThe grep version searches the input for "foobar" [1]. Hence, it doesn't solve the problem. [1] https://github.com/benhoyt/countwords/blob/eb2a8adf21c895907a7abd14a66650eb1f83c1a4/benchmark.py#L23 https://github.com/benhoyt/countwords/blob/eb2a8adf21c895907...
- rtb 6y agoThanks! I think he should make that a lot clearer in the "results" table.
- benhoyt 6y agoThanks 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".