static vars in common function slow it down?!

Started by
11 comments, last by Dwiel 20 years ago
Well, I guess the compiler may optimise this when dealing with builtin types. Not so with types with a ctor however. Anyway it seems that's a moot point in this case.

[edited by - amag on April 5, 2004 5:00:49 PM]
Advertisement
Well that indeed seems to be the case (did another experiment)
And as the OP's function uses built-in types this is definitely not the cause of slow-downs (unless the compiler is broken )


[edited by - nonpop on April 5, 2004 5:52:47 PM]
static, non static, volatile, non volatile, method or object instance variable performance strongly depends on the context and way of usage, there''s just some thumb rules but aren''t absolute.
To make it more funny, also depends on the compiler and compiler settings

-Mat

This topic is closed to new replies.

Advertisement