* Oleg Pronin <[email protected]> [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/> _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
