3 ms·
I recently wrote a brainfuck compiler using Rust [0], but I targeted x86-64 asm directly. I implemented some very basic optimization (as you show at the bottom
by JoshMcguigan 7y ago
I recently wrote a brainfuck compiler using Rust [0], but I targeted x86-64 asm directly. I implemented some very basic optimization (as you show at the bottom of your post), but I'd imagine llvm is able to take things much further. I'd be curious to see a performance comparison.
[0]: https://github.com/JoshMcguigan/nerve https://github.com/JoshMcguigan/nerve
- mhh__ 7y agoState of the art compilers are ridiculously clever sometimes, so I imagine quite a lot. I wonder how good they are at extracting information from code generated from BF however.