﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
39	cannot reproduce run time optimization?	dneise	somebody	"While reviewing the drs calibration in Mars, I found some for loops which were optimized for runtime, to gain a factor of 250% in runtime. That's impressive. 

An example can be seen here:
https://trac.fact-project.org/browser/trunk/Mars/mcore/DrsCalib.h#L52

One can find the original code in a multiline comment above the optimized version. 

I originally wanted to verify that the optimized version really does the same as the un-optimized version, as I was to stupid to understand it, I simply let both versions do the same and compared the outcome.

It really did the same ... that's good. However I noticed no performance gain.
The compiler optimized both versions to run in roughly the same time. When switching compiler optimization off, I saw quite some gain in runtime, but we are not running our FACT++ code without compiler optimization, do we?

{{{
~/fact/Mars/mcore:$ make
g++ forloop_optim.cpp -o forloop_optim && ./forloop_optim
AddRel_simple took 11.969504 s.
AddRel_complex took 5.202990 s.
g++ -O2 forloop_optim.cpp -o forloop_optim && ./forloop_optim
AddRel_simple took 4.952487 s.
AddRel_complex took 4.896322 s.
}}}

I will try to attach the code and the makefile I used to test this.


Can you tell me, why I am not seeing the performance boost mentioned in the comment?"	enhancement	new	major	milestone1	component1				
