This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Speeding up method searches
- To: java-discuss at sourceware dot cygnus dot com
- Subject: Speeding up method searches
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Mon, 10 Apr 2000 15:35:58 +1200
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 ]