3 ms·
The branch prediction problem is true for every language that doesn't JIT (pronounced: "cheat"). Furthermore, Forth is not limited to threaded code. You can hav
by astrobe_ 9y ago
The branch prediction problem is true for every language that doesn't JIT (pronounced: "cheat"). Furthermore, Forth is not limited to threaded code. You can have some simple code generation (subroutine threaded code+some primitive inlining) if you really want to prioritize speed. Finally, Forth is a simple language with simple implementations so it's often easy to add the primitive(s) you need in order to deal with the bottlenecks.