tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 56582] Use switch(enum) in implementations of ActionHook.action(ActionCode, ...)
Date Thu, 05 Jun 2014 00:56:19 GMT

--- Comment #4 from Christopher Schultz <> ---
(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.


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:
For additional commands, e-mail:

View raw message