by aasasd · 7y ago · 0 comments
The main idea behind G-Fu is to complement Go by providing a more expressive experience while delegating the heavy-lifting. Which means that performance is far from the top priority.
Here's a project doing that: https://news.ycombinator.com/item?id=19508616
This is a theory around this approach: https://en.wikipedia.org/wiki/Partial_evaluation#Futamura_pr...
It's a nice compromise. The emit-logic can be kept fairly uniform and low-maintenance since its more or less identical to the regular interpreter.
I got around 10% increased performance on a Forth in C for whatever that's worth.
One thing to keep in mind is to use functions in the emitted code rather than simply dumping everything in a pile. Most compilers don't deal well with code piles from my experience , which makes the code both compile and run slower than it could.
It's very shallow though, more demo toy than practical tool like most Lisps.
And the posted link seems to be one of those.
Just wanted to note that its not really comparable to what g-fu is doing.