Chandra-MARX / marx

Chandra X-ray Observatory ray-trace simulator
http://space.mit.edu/cxc/marx/
5 stars 4 forks source link

do not specify __inline__ #14

Closed hamogu closed 8 years ago

hamogu commented 8 years ago

I've run extensive speeds tests with different compilers on different machine. I did not test marx2fits, because it generally makes up only a small fraction of the marx runtime (specifically for large simulations where the the runtime matters most) and I did not test marxasp (again, it usually makes up small fraction of the runtime, except for very long observations with very low cont rates).

I tested on

I found that the runtime does not differ by more than 10% (usually it's within 5%) between this commit (no inline) and the master (inline specified for gcc). In most cases, it is actually faster not to request inlineing manually - and this is true for all optimization levels above O0.

It seems that the overhead saved by inlining is smaller than other optimizations that modern compilers can do when the program does not specify any specific optimization through function attributes.