Since all benchmarks are crap anyway, I've written a test which tells
the average number of instructions per second. On my athlon 700 I get
3966053 instructions per second and on my PIII 866 I get 5081485
instructions per second. Do those sound like reasonable numbers? Of
course, since time_i is one of the opcodes looped, it probably brings
the numbers down.
Brian
# Compute instructions/sec using parrot asm
# Brian Wheeler [EMAIL PROTECTED]
# loop 6 times, throwing out the first one, and compute the average
loops equ I32
counter equ I31
stime equ I30
etime equ I29
ctime equ I28
sum equ I27
mintime equ 2
main: eq loops,6,done
set counter,0
time stime
set etime,stime
inc etime,mintime
$again: inc counter
time ctime
ne etime,ctime,$again
set I1,3
set I2,mintime
mul counter,counter,I1
div counter,counter,I2
# we do not count the first iteration since it has the
# biggest error. (we probably started near the middle of a
# second)
inc loops
eq loops,1,main
add sum,sum,counter
branch main
done: set I1,5
div I2,sum,I1
print I2
print " instructions per second\n"
end