benchmarks: add a simple choose benchmark (#26)

FossilOrigin-Name: a0cac831c406f978982a1a9af3eebe038c04be485e1c72ed834f3538b4def8d5
This commit is contained in:
crc 2020-12-18 20:18:13 +00:00
parent fd082fbffa
commit e61c0364df
3 changed files with 9 additions and 0 deletions

6
benchmarks/choose.retro Normal file
View file

@ -0,0 +1,6 @@
~~~
'1,000,000_iterations_of_choose s:put nl
#1000 [ #500 [ FALSE [ ] [ ] choose ] times ] times
#1000 [ #500 [ TRUE [ ] [ ] choose ] times ] times
~~~

View file

@ -2,3 +2,4 @@
time retro times.retro
time retro push-drop.retro
time retro choose.retro

View file

@ -8,9 +8,11 @@ cp ../ngaImage .
echo Python3
time python3 retro.py times.retro
time python3 retro.py push-drop.retro
time python3 retro.py choose.retro
echo PyPy
time pypy retro.py times.retro
time pypy retro.py push-drop.retro
time pypy retro.py choose.retro
rm -f retro.py ngaImage