Tag Archives: c

Compiler code generation: just flatten the tree

I spent some time tonight working on the compiler I am writing for my own education. I started this project while only understanding bits and pieces of what it takes to write a compiler, but I am quickly learning more. Various texts on compilers start with creating a simple calculator program that takes a string [...]

Genie: Write Python-like code that runs as fast as pure C

There is an article on the Postabon Blog titled “Make Lisp 15x faster than Python or 4x faster than Java.” In his benchmark, which is a tightly nested loop doing some trigonometric calculations, he achieves speed similar to Java with unoptimized Lisp and a 4X speed increase over that with some Lisp optimizations. He also [...]