News for hackers. Stuff that matters.
Re:Beating C with 70 lines of Go by cjensen on Wednesday November 20, 2019 @03:26PM (#21588108)
The version you are comparing against is ancient and assumes a low-memory footprint. It only uses something like 10KB of data. It also has a ton more features -- like command line parsing, the ability to read from a file on the command line or stdin, and locale-specific recognition of whitespace.

It's really not solving the same problem.

Re:Beating C with 70 lines of Go by ajeetdsouza on Wednesday November 20, 2019 @03:53PM (#21588387)
Argument parsing is hardly the bottleneck when you're scanning 1 GB of data. The reason I didn't implement the rest of the features was to keep the implementation light and readable, and I don't think a fully compliant wc implemented in Go with these patterns would be significantly slower.

As for having a low-memory footprint, 2 of the 4 implementations I mentioned (one single core, one multi-core) consume less memory than wc, and still run much faster.