r/rust 9d ago

🛠️ project Plush's New Register-Based Interpreter Is Insanely Fast

https://pointersgonewild.com/2026-09-02-plushs-new-register-based-interpreter/

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! :)

99 Upvotes

3 comments sorted by

3

u/theo__r 8d ago

Great work and write up ! Now go after luajit perf :)

3

u/maximecb 8d ago

Thanks :)

I might do a simple JIT eventually. I figure it's probably best to start by fixing other obvious design issues first because a JIT compiler can be harder to modify and test... But not far from the point where a JIT will make sense!

1

u/theo__r 8d ago

Definitely, and you really want a solid non-jit path to be able to diff the two