3 ms·
> The bytecode idea adds complexity and doesn't actually speed up unless you add JIT conversion to native, which makes it a compiler again. In every language i
by munificent 11y ago
> The bytecode idea adds complexity and doesn't actually speed up unless you add JIT conversion to native, which makes it a compiler again.
In every language implementation I've worked with, bytecode led to a large improvement in performance.
> The virtual method penalty is way overstated.
This makes me think your data is outdated. It's more about the loss of locality today than it is virtual method dispatch. With a tree-walk interpreter, your "code" is spread all throughout memory and executing involves jumping all over the address space. That kills your cache.
> Its still 10X faster than an interpreter. And 10X slower than a compiler.
Those numbers don't mean anything without context. What are the semantics of the language? What's the object representation? The memory model? How are local variables managed?
> easily written in a weekend for any simple language.
Call me crazy, but I don't think a bytecode compiler takes any more time than that either.