News for hackers. Stuff that matters.
Re:Beating C with one line of Brainfuck by JoshMcguigan on Sunday November 24, 2019 @04:12PM (#21623452)
Is the 85MB test file available? I wasn't able to find it. I'd like to test this result against nerve [0], a brainfuck to x86_64 asm compiler I wrote (like funkicrab, it is also written in Rust).

[0]: https://github.com/JoshMcguigan/nerve

Re:Beating C with one line of Brainfuck by apankrat on Sunday November 24, 2019 @04:31PM (#21623570)
Same here.

bff [1] has no fancy assembly, not even a compiler, just some basic loop unrolling and jump precomputation, but I too wonder how it compares to wc.

[1] https://github.com/apankrat/bff/

-- edit --

Found words.txt with 466551 words, so replicating it 28 times gets it to the OP's test size. Bff is ~5x slower than 'wc -w' ... which is not unexpected, but still slightly disappointing.

https://github.com/dwyl/english-words/blob/master/words.txt?...

Re:Beating C with one line of Brainfuck by kiwec 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'