-
Compiling an expression to a tree of closures, and a list of statements to a slice of closures, is exactly how I optimized [gomacro](https://github.com/cosmos72/gomacro) my Go interpreter written in go.
There are more tricks available there, as for example unrolling the loop that calls the list of closures, and having a `nop` closure that is executed when there's nothing to run but execution is not yet at the end of the the unrolled loop.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
closure-based-brainfuck-vm
An understandable fast brainfuck interpreter using closures rather than bytecode
For optimal speed, you should move as much code as possible outside the closures.
In particular, you should do the `switch op` at https://github.com/skx/simple-vm/blob/b3917aef0bd6c4178eed0c...
-
The resulting VM implementation reminds me of this post from cloudflare where they similarly use closures to build their interpreter.
https://blog.cloudflare.com/building-fast-interpreters-in-ru...
-
Related posts
-
Fitter - Open Source no-code tool for map-reduce data from different source and even more!
-
Lingo: A Go micro language framework for building Domain Specific Languages
-
GRule – Rule Engine
-
How should I test this function? Should I test all possibilities? Like hasDescription = true and hasExperience = true should return true. hasDescription = true and hasSkill = true should return false
-
conditionals in plain json?