3 ms·
I'm assuming those are SBCL numbers, given who's posting them :-). So, it seems to me that these figures confirm that CASE gets expensive for large numbers of c
by gjm11 17y ago
I'm assuming those are SBCL numbers, given who's posting them :-). So, it seems to me that these figures confirm that CASE gets expensive for large numbers of cases whereas SWITCH doesn't. (You're missing the NCASE-1000 entry. If it's also quite small then you're also confirming that NCASE doesn't get expensive for large numbers of cases.) Which I thought was the most interesting finding here. You've also confirmed that SWITCH is a bit more expensive than CASE and NCASE except when the former blows up.
However. Geoff Wozniak's results seem to show (1) CASE-100 being more expensive than CASE-10, where you find it costing the same; and (2) CASE-1000 being more expensive than CASE-10 by a much larger factor than you've found. The curious thing here is that a constant extra bogus overhead from an expensive SYMBOL-FUNCTION implementation ought (I'd have thought) to bias his results in the opposite direction to that. Are you and he using different versions of SBCL, or something?