API Question Safe Optimization for Orbiter Modules

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,293
Reaction score
846
Points
128
Location
Biddeford ME
Website
mwhume.space
Preferred Pronouns
he/him
So I enabled a few compiler and linker flags while trying to improve the performance of NASSP. Namely these were:

/Ot favor fast code
/GL whole program optimization
/LTGC link time code generation (I think this is turned on implicitly with /GL)

Obviously there isnt a drastic improvement in performance, but it is noticeable.

My question is, is this safe. I don't see why it wouldn't be, and I've tested without issue so far.

The only problem I could forsee is if someone were to link against our SPSDK.lib in a newer version of visual studio, without recompiling and linking it.

If anyone knows of an issue, historicially, that this has caused let me know.

Thanks.
 
Last edited:

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
254
Points
78
Location
This place called "home".
How big of an effect do you see? I've always set the optimization to favour "fast code", but thought that my code was so chaotic that the effect would be negligible. Never tested it, though.

Would be interesting to know if it is actually a significant effect, or mainly placebo. ;)
 

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,293
Reaction score
846
Points
128
Location
Biddeford ME
Website
mwhume.space
Preferred Pronouns
he/him
Timestep length appears to decrease by approximately 3-5% and freezes and stutters are all but gone.

This isn't an objective profile though, and I'll definitely do one before I even think about merging.
 
Top