Finished in which you turn your tree-walking interpreter (book 1) into a compiler + VM. Monkey-C now does fibonacci(35) in ~3 seconds!

Highly recommend these two books. Follow along in another language for double the fun!


Managed to bring it down to ~1.7 seconds because of this comment in CPython's source explaining the performance gain for using computed GOTO's (vs a big ol' switch statement).

Sign in to participate in the conversation

Personal Mastodon instance of @danny.