https://issues.apache.org/bugzilla/show_bug.cgi?id=56582

--- Comment #4 from Christopher Schultz <[email protected]> ---
(In reply to Konstantin Kolinko from comment #1)
> I plan to backport this change to Tomcat 7, as I think switch() behaves
> better for performance.

+1

A tableswitch will be faster than a series of comparisons and jumps. If the set
of cases is sufficiently sparse, it will degrade to a lookupswitch which is no
slower than the old if/elseif implementation and may be a bit faster as
lookupswitch is likely to be a highly-optimized JVM operation not requiring any
JIT trickery.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to