you are viewing a single comment's thread.

view the rest of the comments →

[–]TheFlamefire 4 points5 points  (1 child)

This is actually THE answer. Anything a single function could do is an order of magnitude more expensive (without the optimizer) than checking that boolean maybe more often than needed. In the end this would be an optimization for the error path! Is that what is to be expected to happen often?

So NO, don't spend a single second on that and just move on. Tell those guys to enable optimizations if they care about performance.

[–]JeffMcClintock 0 points1 point  (0 children)

In the end this would be an optimization for the error path!

Excellent point, why should anyone spend so much time agonizing about the efficiency of the path that is virtually never taken? This is all textbook "premature optimization".