are static operations optimized?
are static operations optimized?
- Subject: are static operations optimized?
- From: David Harper <email@hidden>
- Date: Tue, 27 Jan 2009 08:32:28 -0800 (PST)
Hello,
Though perhaps it is irrelevant to fuss about O(1) operations, I was wondering if anyone with some familiarity with the objective-C compiler could say whether static operations are actually calculated at runtime or parsed & pre-calculated for optimization purposes. When I say static operations I refer to those without variables.
For example, if I had a method with the following return statement:
return (128 - 6);
would this be compiled as "return 122" ? Would pre-calculating such things save a relevant amount of clock cycles if such a statement were evaluated, say, 100,000 times per second?
Just curious. I apologize if this is the incorrect list for such a question.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden