quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Speedup monomorphic switch type

Open franz1981 opened this issue 7 months ago • 1 comments

This could hit a performance issue (see https://stackoverflow.com/questions/44988841/force-tableswitch-instead-of-lookupswitch), because the default -XX:MinJumpTableSize is 10 and beyond it, the JIT would produce a jump table, instead of having a sort-of binary search among cases, just using a cascade of if.

This could be alleviated in different ways, like grouping the mostly expected handler(s) type in a main switch and have another "slower path" switch for known but still usually not present handler types.

franz1981 avatar Jan 15 '24 11:01 franz1981

@geoand let me put it in draft, this is mostly to experiment, if you wanna give it a shot

franz1981 avatar Jan 15 '24 11:01 franz1981