[fpc-devel] Optimization theory

Martin fpc at mfriebe.de
Mon Jun 25 17:29:09 CEST 2018


On 25/06/2018 16:18, J. Gareth Moreton wrote:
> One would need to develop some tight timing tests to determine the 
> fastest method for a given number of cases.  As Florian once stated... 
> it takes a large number of jumps before the standard linear 
> subtraction search (where the ordinal difference is subtracted from 
> each case branch in turn) becomes prohibitive.  On modern processors 
> it can be as high as 64.
>

How well does kcachegrind represent those timings?

Granted you don't want to run the entire compiler in kcachegrind, that 
might take very long. But if you extract the relevant code into a 
test/benchmark project, then that might help.



More information about the fpc-devel mailing list