Hi,

It seems yesterdays suspicions confirmed and there is a HUGE bottleneck in hotspot and switch statements. Simple method (with a switch) natively compiles until there are more than 11 switch cases (is always run with 1 and an argument):

With 11 cases there is a massive performance degradation (so it seems it's a jit native compilation/inlining threshold), but it's what I'd actually expect. The weird thing is that after this point method further slows down as new cases are added (this might not be the reason though) and also slows down as new statements are introduced in those cases. And those cases are never run! All this happens gradually. And the best thing is: It DOESNT affect client vm.

With switch 64 cases:
client: 390 ms
server: 821 ms (after being warmed up)

As Damian confirmed this doesn't affect jdk7, where server is anyway faster than the client.

Keeping in mind that the new ByteCodeMatchine2 runs at 1.7 sec speed (when only few switch cases are there) for regex-dna derived benchmark and slows down to 5 sec for the first run (and 3.2 sec when warmed) with all switch cases implemented for the same benchmark. We're obviously observing JOni hitting HUGE jdk6 server vm bottleneck and it's NOT an issue with native compilation/inlining thresholds.

The code I've been playing with: http://pastie.caboo.se/123693

Marcin

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to