-
Notifications
You must be signed in to change notification settings - Fork 5
Assign locations to TFORLOOP loops. #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
FORLOOP (which yklua already recognises) is for numeric looping, e.g.:
```
for i = 1, 10; do ...
```
TFORLOOP is used for other loops, e.g.:
```
for line in io.lines("fasta1000000.txt") do ...
```
Peformance impact (vs. main, based on 3 invocations of 10 iterations):
```
Benchmark Datum0 (ms) Datum1 (ms) Ratio Summary
revcomp/YkLua/default 2458 1850 0.75 24.75% faster
knucleotide/YkLua/default 1846 1594 0.86 13.66% faster
Richards/YkLua/100 4471 4147 0.93 7.24% faster
LuLPeg/YkLua/default 3357 3252 0.97 3.10% faster
Json/YkLua/100 2549 2489 0.98 2.37% faster
Queens/YkLua/1000 504 493 0.98 2.24% faster
HashIds/YkLua/6000 2873 2829 0.98 1.56% faster
binarytrees/YkLua/15 3993 3979 1.00 0.36% faster
Storage/YkLua/1000 9815 9791 1.00 0.24% faster
CD/YkLua/250 8969 8955 1.00 0.16% faster
Heightmap/YkLua/2000 749 749 1.00 0.01% faster
fasta/YkLua/500000 841 841 1.00 0.00% slower
NBody/YkLua/250000 488 488 1.00 0.04% slower
spectralnorm/YkLua/1000 902 907 1.01 0.51% slower
Mandelbrot/YkLua/500 129 130 1.01 0.65% slower
Sieve/YkLua/3000 468 472 1.01 0.84% slower
Towers/YkLua/600 908 918 1.01 1.12% slower
BigLoop/YkLua/1000000000 1617 1641 1.02 1.50% slower
Havlak/YkLua/1500 18926 19245 1.02 1.69% slower
Permute/YkLua/1000 790 804 1.02 1.75% slower
fannkuchredux/YkLua/10 1223 1250 1.02 2.24% slower
DeltaBlue/YkLua/12000 1949 2000 1.03 2.61% slower
List/YkLua/1500 832 859 1.03 3.33% slower
Bounce/YkLua/1500 1142 1186 1.04 3.88% slower
```
|
Why are the slower ones slower? |
|
FWIW, the CI failure is a I will look into the slowdowns. |
|
You can comment that |
Looking to One thing that is evident is that there is more variation at the process execution level after my change: 1: /home/vext01/research/yklua/src/lua harness.lua bounce 10 1500
Mean Std.Dev. Min Median Max
-real 11.460 0.152 11.269 11.409 11.692
-user 11.787 0.157 11.578 11.753 12.023
-sys 0.202 0.021 0.160 0.208 0.220
+real 11.471 0.516 10.978 11.151 12.330
+user 11.787 0.512 11.286 11.475 12.628
+sys 0.197 0.012 0.180 0.192 0.216I'll now fix the trace optimiser |
Will investigate tomorrow. |
FORLOOP (which yklua already recognises) is for numeric looping, e.g.:
TFORLOOP is used for other loops, e.g.:
Peformance impact (vs. main, based on 3 invocations of 10 iterations):