Commit f7e4f9d2 authored by Anton Ertl's avatar Anton Ertl
Browse files

more divspeed measurements; minor fix

parent ef84dc54
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -73,19 +73,22 @@ s" :noname [ xt @ >name name>string ] 2literal type ms@" 2constant s1
testA  /
testA  MOD
testB  /MOD
testA  U/
testA  UMOD
testB  U/MOD
testE  */
testC  */MOD
testC  FM/MOD
testC  SM/REM
testD  UM/MOD   ( testC causes overflow for UM/MOD )
testF  M*/
9 table tests
12 table tests

: .elapsed ( starttime -- ) ms@ 9 emit swap - 4 .r ."  ms" ;

: run-tests
    cr ." Speed Tests:"
    9 0 DO  cr I cells tests + @ execute .elapsed LOOP cr ;
    12 0 DO  cr I cells tests + @ execute .elapsed LOOP cr ;


run-tests
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ definitions
: next-head ( addr1 -- addr2 ) \ gforth
    \G find the next header starting after addr1, up to here (unreliable).
    here swap u+do
	i xt? -2 and if
	i xt? if
	    i name>string drop cell negate and unloop exit
	then
    cell +loop