Hi.

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?

Interpreting a commandline speeds up if you use a constant found in  
the dictionary, as 1 or 2 or other constants you create. INTERPRET  
tries to FIND a WORD first, if that fails, tries to convert it as a  
NUMBER, and if that fails too you get an errormessage.

Try:
: example1  1 1 + . ;
: example2  1000 1000 + . ;
What runtimes did you find now?


Michael


------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Amforth-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to