3 ms·
> Interpreters also don't need to be all that slow; I guess this guy's never heard of Forth? Well, for one thing, once you get to subroutine-threaded code (whi
by int_19h 4y ago
> Interpreters also don't need to be all that slow; I guess this guy's never heard of Forth?
Well, for one thing, once you get to subroutine-threaded code (which is often the most efficient way to implement it on modern architectures), it's arguable whether still counts as "interpreted".
But even then, FORTH is still several times slower than equivalent native code. Which is better than most naive bytecode interpreter, but it's also why industrial FORTH compilers do native code inlining and other optimizations to reach the desired degree of performance. At which point, what's the fundamental difference with C?