kiwec·7 jaar geleden·discussFor some reason, wc is even slower with LANG=C. cat words.txt | time wc -w 13018291 0.76 user 0.01 system 0:00.78 elapsed That's on the default wc build of void linux, and not in a proper benchmark environment, but that's still strange.
kiwec·7 jaar geleden·discussAfter editing my code to use EOF == 0, I get : 19.55 user 21.49 system 0:41.13 elapsed However, you're using 8-bit cells, so the resulting word count is incorrect. In case you're wondering, the file was generated with : python3 -m faker -o words.txt text -r [large number] -s '\n'
That's on the default wc build of void linux, and not in a proper benchmark environment, but that's still strange.