[fpc-pascal] code optimization

luca_manganelli at comune.trento.it luca_manganelli at comune.trento.it
Wed Sep 22 09:11:05 CEST 2010

fpc-pascal-bounces at lists.freepascal.org scritti il 22/09/2010 08.08.45

> is this a benchmark program or a complex program you are talking about.
> If it is a benchmark, then it would be interesting to see the code,
> because from my experience I doubt that Delphi produces better code than
> fpc (in general it is the other way round). If it is a complex program,
> then you need to analyze carefully which part of the program consumes
> the most time and why. A number of 50% is in anyway unrealistic (this is
> something you get if you compare inlined code against uninlined) ,
> because the differences you get from code optimization are in a range
> from +/-10% normally - unless you have found a real performance
> bottleneck. And sometimes (most of) it is only an unoptimized library

"We should forget about small efficiencies, say about 97% of the time:
premature optimization is the root of all evil"

Donald Knuth

More information about the fpc-pascal mailing list