A simple Brainfuck interpreter written in C. It can also transpile a Brainfuck program to C.
It groups adjacent characters of the same type into a single instruction. These optimized instructions are then ran by the interpreter.
Source:
++++ ++++
Optimized code:
{ '+' : 8 }
Before this optimization, it used to take roughly 41 seconds to run Erik Dubbelboer's Mandelbrot program. After optimization, it takes about 17 seconds.
make
bf [--traspile] [FILE]
Interpret:
bf test.bf
Transpile to C:
bf --transpile test.bf