lookuptables vs switch(x)

Doug Gwyn gwyn at smoke.brl.mil
Sun Nov 18 08:07:37 AEST 1990


In article <1351 at umvlsi.ecs.umass.edu> breck at star.ecs.umass.edu (Liam Breck) writes:
>Which is faster?

Generally the switch statement will be faster than a search loop.

>If I put the switch in its own function how much will that slow things down?

How could we possibly know -- you haven't said what system you're using.



More information about the Comp.lang.c mailing list