R
Roger Lindsjö
Making the loops smaller it is easier to show that "something" happens.
I ran it with 10000000 iterations instead, and then the output showed:
Bench 15
Took 0.229 seconds
Bench 16
Took 0.228 seconds
Bench 17
Took 0.228 seconds
Bench 18
Took 0.105 seconds
Bench 19
Took 0.107 seconds
Bench 20
Took 0.106 seconds
Bench 21
Took 0.107 seconds
So, after 18 iterations the time for each loop is halved. I'm pretty
sure this is not a cache warmup (it it is the coldest cache I have ever
seen ;-) )
Didn't manage to get compiler debugging to output anything, will se if I
can get some more info.
//Roger Lindsjö
I ran it with 10000000 iterations instead, and then the output showed:
Bench 15
Took 0.229 seconds
Bench 16
Took 0.228 seconds
Bench 17
Took 0.228 seconds
Bench 18
Took 0.105 seconds
Bench 19
Took 0.107 seconds
Bench 20
Took 0.106 seconds
Bench 21
Took 0.107 seconds
So, after 18 iterations the time for each loop is halved. I'm pretty
sure this is not a cache warmup (it it is the coldest cache I have ever
seen ;-) )
Didn't manage to get compiler debugging to output anything, will se if I
can get some more info.
//Roger Lindsjö