[fpc-devel] LEA instruction speed

Marco van de Voort fpc at pascalprogramming.org
Tue Oct 10 12:19:11 CEST 2023


Op 10-10-2023 om 11:13 schreef J. Gareth Moreton via fpc-devel:
> Thanks Tomas,
>
> Nothing is broken, but the timing measurement isn't precise enough.
>
> Normally I have a much higher iteration count (e.g. 1,000,000), but I 
> had reduced it to 10,000 because, coupled with the 1,000 iterations in 
> the subroutines themselves, would have led to 1,000,000,000 passes and 
> hence would take in the region of five to ten minutes to complete for 
> a 16 MHz 386, for example.  Rika's suggestion of running as many 
> iterations as needed until, say, 5 seconds elapses, would help but the 
> timing measurements would cause a lot of latency and will be imprecise 
> on very slow routines.  Still, let's see if 100,000 gives better 
> results for you.
>
I had the same problem, and now it is stable  Ryzen 5700X (ZEN3)

    Pascal control case: 0.7 ns/call
  Using LEA instruction: 0.4 ns/call
Using ADD instructions: 0.7 ns/call



More information about the fpc-devel mailing list