[Catalyst] Re: Alternatives to Catalyst ?

Aristotle Pagaltzis pagaltzis at gmx.de
Thu Apr 29 15:02:41 GMT 2010


* Oleg Pronin <syber.rus at gmail.com> [2010-04-29 11:10]:
> Maybe it is not the bottleneck, but how many places do we have
> like this that are "not a bottleneck" ? maybe the sum of all
> these "mini" mistakes is the bottleneck ?

Maybe, maybe, maybe. Stop guessing. Profile the code in question.

Here is my experience – *experience*, not theory, and not dogma:

If you look at any non-trivial piece of code, and you guess where
the performance bottleneck in that code will be, you will ALWAYS
be wrong. This is not a figure of speech. I am not taking poetic
licence here. I very literally mean you will guess wrong EACH and
EVERY single time.

Furthermore my experience is that in almost any codebase, the
execution time is spent almost entirely in very few spots. If you
optimise any other part than those spots, even if you make it
500,000 times faster, the result will be virtually nil. You can
even make *every*thing faster, *except* the hotspots, and it will
still add up to almost no improvement.

This is why we don’t all still write assembly today.

(Which is actually a pity, and part of the reason why so much
code today is so slow. Not because the code isn’t written in
assembly, but because it’s not written by assembly programmers.)

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list