thats most of the benchmarking

strange about the puts in soml, hard to see where a factor of 10 would
come from
This commit is contained in:
Torsten Ruger
2015-11-20 23:51:58 +02:00
parent 28836457c5
commit 96972dab29
13 changed files with 115 additions and 30 deletions

View File

@ -29,6 +29,8 @@ module RuntimeTests
def check ret = nil
load_program
check_remote ret
exit
interpreter = Register::Interpreter.new
interpreter.start @machine.init
count = 0
@ -59,9 +61,9 @@ module RuntimeTests
return unless box = connected
load_program
file = write_object_file
print "\nfile #{file} "
r_file = file.sub("./" , "salama/")
box.file_upload file , r_file
print "\nfile #{file} "
box.ld "-N", r_file
begin #need to rescue here as rye throws if no return 0
ret = box.aout # and we use return to mean something

View File

@ -179,6 +179,15 @@ five.putstring()"
@stdout = " 21"
check 21
end
def test_fib20_1000
@main = "int count = 1000
while_plus( count - 1)
20.fibr( )
count = count - 1
end
return count"
check 0
end
def test_fibw8
@main = "int fib = 8.fibw( )
@ -193,9 +202,8 @@ five.putstring()"
check 6765
end
def pest_fib40_1000000
@main = "int count = 999424
count = count + 576
def test_fib40_100000
@main = "int count = 100352 - 352
while_plus( count - 1)
40.fibw( )
count = count - 1
@ -203,4 +211,21 @@ five.putstring()"
return count"
check 0
end
def test_itos_100000
@main = "int count = 100352 - 352
while_plus( count - 1)
count.to_s( )
count = count - 1
end
return count"
check 0
end
def test_loop_100000
@main = "int count = 100352 - 352
while_plus( count - 1)
count = count - 1
end
return count"
check 0
end
end

View File

@ -177,4 +177,17 @@ return w.char_length
HERE
check 4
end
def test_puts_100000
@main = <<HERE
int count = 100352 - 352
Word hello = "Hello there"
while_plus( count - 1)
hello.putstring()
count = count - 1
end
return 1
HERE
check 1
end
end