I like the absence of globals that so often litter vm interpreters. This makes it great for embedding.
Is there a structural reason why its slower than python or is it just a temporary lack of optimisation?
Is there a structural reason why its slower than python or is it just a temporary lack of optimisation?
Don't know, both use computed goto so dispatch shouldn't be the problem. But Python is VERY well optimized by now and aLisp is a few weeks old.
I did implement the whole thing on top of a single data structure, an embedded double linked list, which is somewhat unusual I guess. But most of the nodes are slab allocated by type so data locality shouldn't be it either.
aLisp is definitely more static than Python, which barely has any structure at all; I'm hoping that will lead to more opportunities for optimization down the line.