From: Matthias T. <mt...@we...> - 2011-04-03 07:22:37
|
pito wrote: > Hi, when running the amforth4.2 in simulator I've observed > following: > a) "1 1 + ." takes 42sec to calculate > b) "1000 1000 3000 + - ." takes 60sec to calculate. > Does it mean the amforth spends most of the time with tokens lookup? The dictionary is always searched first. A number conversion is the second step, thus: yes in your case most of the time is spent in useless dictionary lookups. There are varios ways to speed things up, but they have more or less hack value. (see the recognizers in subversion trunk) > P. > PS: I've spend some time with FlashForth 4.7 (pic24 and dspic33, > subroutine threaded) and the mips to mips comparision with the same > code (Sieve, the only difference the FF uses "for next" instead of > "do loop") shows 8x speed advantage of the FF. Flashforth is "subroutine threaded forth with native code generation" (from the homepage), amforth is indirect threaded without any native code generation. I'd have expected a (much) bigger speed difference. Matthias |