Plush's New Register-Based Interpreter Is Insanely Fast

91 points maximecb 3 comments

Hi everyone! I posted last week about some optimizations I had done to the Plush language interpreter to shrink the size of the Value type (previously a plain Rust enum), and the community seemed to really enjoy the post. This week I'm back with a rewrite of its interpreter with some massive performance gains which came out even better than I expected. The instruction layout is now specified with a self-documenting Rust macro which I think is very elegant, it's designed to be easy to read. Hope you like it! Happy to answer any questions.

Sidenote: someone reported issues with reddit app browser rendering of my blog last week. I tried to fix that this morning. Let me know if it looks good on your end! :)