[fpc-devel] Curious about the effect of all the new optimizations....
Sven Barth
pascaldragon at googlemail.com
Wed Mar 1 14:10:28 CET 2023
J. Gareth Moreton via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am
Mi., 1. März 2023, 12:25:
> My peephole optimisations mostly save only a handful of cycles each time
> which probably won't add up to much for a relatively short test. The
> most major optimisation I can think of, although I'm not quite sure when
> it was merged, is the method of replacing divisions by a constant with
> an equivalent reciprocal multiplication. You'll see the biggest savings
> there. There's other difficulties like processors being intelligent
> with caching and out of order execution, for example, that are
> disguising some inefficiencies. And some seek only to reduce code size
> with no loss of speed.
>
> What are your timings like when compiling with COREAVX or COREAVX2? A
> couple of recent peephole optimizations make use of BMI1 and BMI2.
>
> I can't remember the proverb that Florian used, but it essentially boils
> down to very small changes, individually not amounting to much, but
> which accumulate into a noticable difference when in large numbers.
>
It's a German proverb: "Mühsam ernährt sich das Eichhörnchen"
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20230301/43f822d9/attachment.htm>
More information about the fpc-devel
mailing list