instanceof (and checkcast, etc) are fairly slow in gcj currently. Here are a couple of papers on the topic of speeding this up:
http://lambda-the-ultimate.org/node/view/1218 http://people.csail.mit.edu/jrb/pve/index.htm -- Summary: fast instanceof checking Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tromey at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25934