the "price" of a context switch/function call

Mark Wieder mwieder at ahsoftware.net
Sat Oct 4 21:51:18 EDT 2014


Geoff-

Saturday, October 4, 2014, 6:27:41 PM, you wrote:

> On Sat, Oct 4, 2014 at 12:54 PM, Dr. Hawkins <dochawk at gmail.com> wrote:

>> If I'm going to call a routine, say, 100 times in a fraction of a second,
>> do I really save much by inlining it rather than calling it as a function?
>>

> Premature optimization is the root of <some> evil. If you write clean code,
> it will be straightforward to optimize. If you write unclean optimized
> code, it will never be clean.

I think the proper adage here may be that first you write the code,
then you make it work better, and finally you make it work faster.

I spend much more time refactoring my code to make it more readable
and more easily maintainable than I do optimizing for speed.

But to answer the OP's question: no.

-- 
-Mark Wieder
 ahsoftware at gmail.com

This communication may be unlawfully collected and stored by the National 
Security Agency (NSA) in secret. The parties to this email do not 
consent to the retrieving or storing of this communication and any 
related metadata, as well as printing, copying, re-transmitting, 
disseminating, or otherwise using it. If you believe you have received 
this communication in error, please delete it immediately.





More information about the use-livecode mailing list