-
threaded-code-benchmark
A demonstration of ways to implement 'threaded code,' a technique used in Forth and in virtual machines like the JVM.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
You have to call the function. This adds a new stack frame, which then is closed when the function concludes. I posted a benchmark of various techniques of VM implementation here today. Just calling the function will always be the slowest due to the work the processor has to do for each instruction.
https://github.com/shadowofneptune/threaded-code-benchmark
Basically, you're better off with a massive switch statement, even if it's ugly in terms of program organization.
No questions (yet) but I found this a really good post. I'm a Rust newbie and I've coincidentally just started working through 'Crafting Interpreters' using Rust as my implementation language. Some of your code has helped clarify things in my mind.
My actual long-term goal is to build a VM in Rust and then use this to re-do the Make A Lisp project [0]. I did this a couple of years ago using C# and felt vaguely uneasy that I was using C# to do the heavy lifting associated with garbage collection, etc.
[0] https://github.com/kanaka/mal