Brief
bfj is a brainfuck interpreter/jit-compiler written in Java. The jit implementation and optimization yields a relatively good performance.
Performance
| bf program | interpreter | jit-compile |
| hanoi.bf | 5562 ms | 1016 ms |
| mandelbrot.b | 78938 ms | 5375 ms |
Usage
Interpreting
/bin> java bf.runner.BrainfuckRunner ../bf/mandelbrot.b
Compile and run
In Linux:
/bin> java -cp ../lib/asm-3.1.jar:. bf.runner.BF2BytecodeRunner ../bf/mandelbrot.b
In Windows:
/bin> java -cp ../lib/asm-3.1.jar;. bf.runner.BF2BytecodeRunner ../bf/mandelbrot.b
Limitation
Currently not support ',' command.