While developing the xc8 version of FF I also optimized the speed of the
interpreter.
Particularly FIND is a lot faster.
To test the interpreter speed I have used this line.
ticks busy busy busy busy busy busy ticks swap - u.
With the xc8 code the result is 6 milliseconds.
With the avrasm2 code (= the current hex files in the distro) the result
is 56 milliseconds.
So a 10x improvement in interpreting speed and then also to the
compilation speed.
Particularly with the 32u4 (Arduino Leonardo) the text just flies by on
the screen,
since there is no UART to slow things down.
There is one minor snag to it. When compiling a tail jump recursion, the
word header
may not be yet written to flash, so a IFLUSH should preeceed the tail
jump.
This was a sacrifice to the consistency of FlashForth for the
interpretation speed.
: foo 1 drop [ iflush ] foo ;
--
--
Mikael
|