Consider using a mapping lookup in F_SWITCH when case ranges are not in use.
array.c:switch_lookup()
currently uses binary search to perform the lookup. In the common case where no F_CASE_RANGE
s are used it would be possible to just use a mapping lookup instead.
This would require a slight API change for switch_lookup()
in that the first argument would need to be a struct svalue *
(instead of the current struct array *
).