Speeding up method searches

Bryce McKinlay bryce@albatross.co.nz
Sun Apr 9 20:35:00 GMT 2000


Various routines in libgcj currently perform linear string-comparison
searches in order to locate methods in class method tables - most
notably the reflection code, the interpreter, and interface method table
generation. This is very slow, and would also represent a significant
bottleneck for anyone wanting to implement a JIT compiler on the libgcj
platform.
Now, if the compiler could sort the methods table alphanumerically, we
should be able to get a huge speed increase in all these places by doing
a simple binary search.
Would it be possible to implement this in the compiler? Or does the
Class::methods table somehow depend on the vtable order of methods?
regards
 [ bryce ]


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /