Follow-up Comment #2, patch #4949 (project freeciv): If your var is one of the "specenum" thingies used here, and you optimize for size, the machine code should be a jump table to the function calls.
20 years old observation, the point being, a compiled switch does not necessarily compare cases sequentially. Code intended for debugging could do this, and Emmet's suggestion would be independent of compiler options. (This old report was linked in bug #22944 about freeciv_web optimizations after 2.5.) _______________________________________________________ Reply to this item at: <http://gna.org/patch/?4949> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev