kiwec
Re:Beating C with one line of Brainfuck
on Monday November 25, 2019 @02:11AM (#21626073)
For 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.
Re:Beating C with one line of Brainfuck
on Monday November 25, 2019 @02:06AM (#21626056)
After 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'