optimization tricks ?

David Gould <>
Wed May 17 09:27:13 CEST 2000


On Tue, May 16, 2000 at 02:42:35PM +0200, Bjorn Gustavsson wrote:
> In a C++ project some five years ago our program was too slow. Elobarate
> re-designs were proposed. When I profiled the program with Quantify,
> the bottle-neck turned out to be a short loop where an object was allocated
> and then immediately destroyed each time the loop was executed. Moving
> the object allocation out of the loop eliminated the entire speed problem.

Quantify is a pretty good at what it does, but beware, on modern machines
it can be seriously misleading. Quantify counts instructions executed. It
does not measure real time, nor does it account for memory latency or cache
effects. Since cache behavior can make order of magnitude changes in runtime,
it is important to optimize this, and Quantify is of no help here.

-dg

-- 
David Gould                              510.536.1443 
                                         510.628.3380
- If simplicity worked, the world would be overrun with insects. -




More information about the erlang-questions mailing list