-O1
Comparison with array length=20000, iterations=10000
RevSimple 0.41s RevPtr 0.31s RevPtr2 0.33s
Comparison with array length=20000, iterations=100000
RevSimple 4.08s RevPtr 3.16s RevPtr2 3.14s
Comparison with array length=200000, iterations=10000
RevSimple 4.11s RevPtr 3.20s RevPtr2 3.17s
Comparison with array length=200000, iterations=100000
RevSimple 41.32s RevPtr 32.06s RevPtr2 31.82s
-O1 -OoREGVAR
Comparison with array length=20000, iterations=10000
RevSimple 0.30s RevPtr 0.19s RevPtr2 0.19s
Comparison with array length=20000, iterations=100000
RevSimple 3.00s RevPtr 1.86s RevPtr2 1.86s
Comparison with array length=200000, iterations=10000
RevSimple 3.06s RevPtr 1.91s RevPtr2 1.92s
Comparison with array length=200000, iterations=100000
RevSimple 30.64s RevPtr 19.16s RevPtr2 19.24s
-----> RevSimple 37% more time than pointers
-O4 -OoREGVAR
Comparison with array length=20000, iterations=10000
RevSimple 0.22s RevPtr 0.19s RevPtr2 0.19s
Comparison with array length=20000, iterations=100000
RevSimple 2.20s RevPtr 1.84s RevPtr2 1.81s
Comparison with array length=200000, iterations=10000
RevSimple 2.25s RevPtr 1.94s RevPtr2 1.91s
Comparison with array length=200000, iterations=100000
RevSimple 22.17s RevPtr 19.36s RevPtr2 19.36s
-----> RevSimple 14% more time than pointers
Using howardpc code, I get similar timings for engkin, taazz or my submission within <2%.
I get ratio for RevSimple / RevPtr nearly the same as tazz. I dont understand how howardpc gets such different timings.
-O1 RevSimple takes > 30% time more than any of our RevPtr routines.
-O1 -OoREGVAR is roughly 30% faster than -O1 for both code.
No real change from -O1 to -O3 included.
It is only at -O4 that the ratio falls down to a bit more than 10%.
Thus for debuggable code the approach to say 60 bytes will be 30% faster than 96 bytes is a reasonable approach.