[fpc-devel] Documentation check
Marco van de Voort
fpc at pascalprogramming.org
Tue Dec 11 20:48:28 CET 2018
Op 2018-12-11 om 17:12 schreef J. Gareth Moreton:
>
> I've just written up a new segment on the Wiki about how jump tables
> work. Since I want to look at implementing my binary search option, I
> thought I'd document what already exists;
>
> http://wiki.freepascal.org/Case_Compiler_Optimization
>
> The "Jump Table" section is what I've added. Can people check to see
> that I've got it correct? I had to go back and edit it a few times
> because I got the AT&T and Intel operand ordering mixed up!
I'm not really a compiler person, but afaik for large n, the number of
tests can be log(n) using a bisection algorithm. The microchip C
(pic16/18/24/33) compilre implements this. IOW the number of linear
tests is not the metric to compare to.
More information about the fpc-devel
mailing list