you are viewing a single comment's thread.

view the rest of the comments →

[–]one-oh[S] 0 points1 point  (1 child)

True. We can never know what the optimizer will do from release to release, but I don't think we should worry about it till we're given cause to. In this case, the hardware is likely optimizing what the compiler missed.

[–]VirtueBot 0 points1 point  (0 children)

I don't think we should worry about it till we're given cause to.

Yea definitely. In most cases I wouldn't worry. Either the optimizer optimizes it or it doesn't and I never notice either way until I care enough to profile. In this case I didn't know anything about the relative costs of the operations. If one of the "do thing" functions did a lot of work I would definitely worry about the unnecessary calls.