Skip to content

An improved version of my older project "branflakes", an optimising brainfuck compiler.

License

Notifications You must be signed in to change notification settings

DavidBuchanan314/branflakes-ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

branflakes-ng

An improved version of my older project "branflakes", an optimising brainfuck compiler.

My original branflakes project was written in C, and it compiled brainfuck to in-memory machine code before executing it. The code was a complete mess, the optimising passes were incredibly complex to understand, and as a result there were several obscure bugs which I never tracked down.

branflakes-ng attempts to fix these issues. The brainfuck code is converted into a relatively flexible Intermediate Representation, which optimisations are then performed on.

Finally, one of several backends is chosen to generate output code, whether it be x86_64 assembly or C source code.

Performance

Beef copy.sh Branflakes branflakes-ng x86_64 asm branflakes-ng compiled c Tritium
mandel.b 4m36.388s 0m3.99s 0m2.279s 0m1.690s 0m1.538s 0m1.084s

TODO

  • Optimise multiplications

About

An improved version of my older project "branflakes", an optimising brainfuck compiler.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published