Group: comp.lang.c++
From: "Default User"
Date: Friday, February 15, 2008 12:24 PM
Subject: Re: make it faster

James Kanze wrote:

> On Feb 14, 8:57 pm, Simply_Red wrote:

> > Dist is used at least 497235 time, so even a small change can
> > make a difference.
>
> How much time does Dist actually take? (A quick check on my
> machine says less than 50 nanoseconds. Which means that a half
> a million times is still something to be measured in 10's of
> milliseconds---hardly a problem, I would think.)

This is exactly the problem with shotgun optimizations. One can spend a
lot of time, and obfuscate the code, for essentially no return.
Sometimes the efforts will actually slow things down, when you defeat a
built-in compiler optimization.



Brian

Safety Articles | Usenet Groups | Usenet News | Bluegrass