Quoting "Christoph Groth" <cwg@xxxxxxxx>:
I do not know how to solve the problem you described, but another way of
speeding up a switch statement might be using the GCC extension "Labels
as Values".
http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
Thank you very much! This was exactly what I was looking for.
I made a completely non-standard, spaghettisized version of the
program and luckily it did not run any faster than the switch-based
one, so I can stick to my -ansi option. The earlier reported speedup
was probably just an outlier in the performance test.
Many thanks! Now I can put this behind me and work on other aspects.
Henrik