Re:Jonesforth: Implementing Forth in Assembly
by rwmj on Tuesday April 07, 2020 @01:05PM
(#22805107)
That paper refers to interpreters in the traditional sense. However threaded code is not interpreted in the same way. After every instruction is a computed jump. There are benchmarks on this in the jonesforth code you can actually run and you will observe the exact problem there.
[ Parent
| on HN ]
Re:Jonesforth: Implementing Forth in Assembly
by cygx on Tuesday April 07, 2020 @03:14PM
(#22806464)
Note that the paper does compare a switch-based dispatcher to a computed-goto version ('jump threading') - cf figure 2. The latter used to have a significant performance advantage over the former, which is apparently no longer true (cf figure 3 (a)). That of course doesn't invalidate your point.