Pre tree-SSA, we did an optimization whereby we only initialized a class once per method invocation. This optimization was disabled for some reason, and we now call _Jv_InitClass multiple times.
The worst case is a simple function like this: public static int Ack(int m, int n) { return (m == 0) ? (n + 1) : ((n == 0) ? Ack(m-1, 1) : Ack(m-1, Ack(m, n - 1))); } where Jv_InitClass is now called four times, leading to very poor performance. -- Summary: Static class init optimization is broken Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aph at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21044