Follow

Finished compilerbook.com 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).

Show thread
Sign in to participate in the conversation
Mastodon

Personal Mastodon instance of @danny.