Hi,
David MacIver <david.maciver <at> gmail.com> writes:
>
http://blogs.sun.com/navi/entry/scala_puzzlers_part_2>
> Anyone know what's going on here?
I added a comment to the blog, but it's under moderation so repeating it here:
If you add -XX:+PrintCompilation to your launcher, you will notice that no
methods are compiled by the HotSpot JIT for the broken version. This means that
it runs purely in the interpreter and as such it's horribly slow. The fixed
version does not have the same issue.
My theory is that code that runs in the class initialiser cannot be JITed or
something similar and that is the source of the problem.
Regards,
Ismael