begin implementing small benchmarks (#26)
FossilOrigin-Name: 64bf804f97086c309db9bd87b5daa2cd086566098e5d9b93845c96920420c585
This commit is contained in:
parent
3b15924f71
commit
fd082fbffa
4 changed files with 30 additions and 0 deletions
4
benchmarks/nga-c.sh
Executable file
4
benchmarks/nga-c.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
time retro times.retro
|
||||||
|
time retro push-drop.retro
|
16
benchmarks/nga-python.sh
Executable file
16
benchmarks/nga-python.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
retro tools/amalgamate-python.retro >benchmarks/retro.py
|
||||||
|
cd benchmarks
|
||||||
|
cp ../ngaImage .
|
||||||
|
|
||||||
|
echo Python3
|
||||||
|
time python3 retro.py times.retro
|
||||||
|
time python3 retro.py push-drop.retro
|
||||||
|
|
||||||
|
echo PyPy
|
||||||
|
time pypy retro.py times.retro
|
||||||
|
time pypy retro.py push-drop.retro
|
||||||
|
|
||||||
|
rm -f retro.py ngaImage
|
5
benchmarks/push-drop.retro
Normal file
5
benchmarks/push-drop.retro
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
~~~
|
||||||
|
'Push_and_discard_a_value_1,000,000_times s:put nl
|
||||||
|
#1000 [ #1000 [ #1 drop ] times ] times
|
||||||
|
~~~
|
||||||
|
|
5
benchmarks/times.retro
Normal file
5
benchmarks/times.retro
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
~~~
|
||||||
|
'1,000,000_iterations_of_empty_loops s:put nl
|
||||||
|
#100 [ #100 [ #100 [ ] times ] times ] times
|
||||||
|
~~~
|
||||||
|
|
Loading…
Reference in a new issue