I’m currently considering weather to continue with work on my new Dhall implementation, or to try to improve performance of dhall-ruby more before I do so that hopefully the new one can also benefit.
I have done some lower-hanging fruit, but really if I’m serious about this I expect the NbE style that dhall-haskell has switched to will yield an even better speedup when basic operations are slower (as is the case in most scripting language targets). I’m wondering if there are any good notes / thoughts around about this approach that I should be reading (besides the dhall-haskell source and possibly commit messages of course).
The core idea behind normalization-by-evaluation is that you encode lambdas from the “guest” language (e.g. Dhall) as lambdas in the “host” language (e.g. Haskell) so evaluating function application in the guest language is the same thing as evaluating function application in the host language (which is fast because the host language is presumably well-optimized).
This paper was how I first learned about this idea, and it introduces a lot of useful concepts and terminology (like “quoting”):