Subject: Re: But why?
To: None <davem@caip.rutgers.edu>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: tech-kern
Date: 10/24/1996 08:45:40
"David S. Miller" writes:
>    Date: Wed, 23 Oct 1996 15:45:29 -0400
>    From: "Perry E. Metzger" <perry@piermont.com>
> 
>    "David S. Miller" writes:
>    > So true.  Especially as of late my stream of consciousness has been
>    > "geese, it has been almost two days since I was able to suck a couple
>    > hundred cycles out of a major critical code path, I'm slacking off
>    > again."
> 
>    Is it just me, or does this sort of activity strike anyone else as
>    being a phenomenal waste of time?
> 
> ???  You call this a micro-optimization and a phenomenal waste of
> time?
> 
> Consider an activity the kernel does say 2,500 times per second.  If
> you scrape say 10 cycles out of that operation, what does that work
> out to?
You never finished the calculations, so I'll do it.  10 cycles 2500
times / day, for a day amounts to 10*2500*3600*24 cycles.
Assuming a 200 MHz CPU (which I'm using now) failing to do anything
in parallel (unlikely) this is 10*2500*3600*24/(200*1000000) = 10.8s.
You would be saving me 11s per day.  Yes, this is indeed a micro-optimisation.

>   If you can find 10 or 20 places where you can do something
Then you save less than 3 minutes a day.  Micro-optimisation.
I'm not saying it's bad, but I think you can spend your time
better by saving on higher level issues.

        -- Lennart