3 ms·
Oh no I've already been sucked in to brainfuck by writing an optimizer that compresses instructions using loops. Example "+++++++++++++++++++++++++++++++++++++
by Decabytes 4y ago
Oh no I've already been sucked in to brainfuck by writing an optimizer that compresses instructions using loops.
Example "+++++++++++++++++++++++++++++++++++++++++++." to
"++[>+++++++++++++++++++++++++<-]>."
34 instructions vs 51. But this might pull me in deeper
- teaearlgraycold 4y agoOh interesting. I haven’t seen a BF optimizer that just writes more optimized BF.
- lifthrasiir 4y agoBF loops necessarily need to use more space. How do you determine which cell is free to overwrite? It is often non-trivial because BF data structures are very sensitive to exact strides (e.g. only works when the data pointer is at 5n+4).