Switch implementation

bearophile bearophileHUGS at lycos.com
Tue Sep 28 19:01:06 PDT 2010


Iain Buclaw:

> gdc-4.4 -O3 -fno-jump-tables
> real	0m7.136s
> user	0m7.112s
> sys	0m0.008s
...
> gdc-4.4 -O3 -funroll-loops -fno-jump-tables
> real	0m7.237s
> user	0m7.184s
> sys	0m0.044s
> 
> Differences are pretty minimal...

Probably because gcc/gdc is not using a jump table here, but a binary search tree :-)

Bye,
bearophile


More information about the Digitalmars-d mailing list