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

"The wc program included with macOS and Linux are completely different. Therefore, the following table shows them benchmarked against each other on the same hardware."

Appears BSD wc ("the macOS program") is much faster than the GNU coreutils wc ("the Linux program").

It certainly illustrates a point about people rewriting wc in newer languages to demonstrate alleged speed against C.

Which wc are they using for comparison.

Pehaps they should use wc2 or wc2o.




That's a really good point. I'm using macOS and I tested -w option against a CSV file that is about 430MB in size and has about 18,000,000 words in it. The time was 0.989. When I ran wc2 on the same file, it clocked in at 0.943.

I wondered what I was doing wrong and came back to the comments section and found your comment. Ah.

Edit: interestingly, the newline count time was 0.458 with the macOS version and 0.943 with wc2.




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

Search: