This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Speeding up method searches
- To: Per Bothner <per at bothner dot com>
- Subject: Re: Speeding up method searches
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Sun, 9 Apr 2000 21:54:01 -0700 (PDT)
- Cc: Bryce McKinlay <bryce at albatross dot co dot nz>, java-discuss at sourceware dot cygnus dot com
- References: <38F14C1E.CBA3055D@albatross.co.nz><m2d7nysira.fsf@kelso.bothner.com>
Per> There is a tradeoff here: A binary search will use fewer
Per> comparisons than a linear search on interned strings, but the
Per> cost of each comparison is much cheaper in the latter case, since
Per> you don't need to look at a single character.
My guess is that interning would be more efficient.
But that requires binutils work, which unfortunately lessens its
chance of happening (based on history).
>> Would it be possible to implement this in the compiler? Or does the
>> Class::methods table somehow depend on the vtable order of methods?
Per> Not inherently at least, I think.
Offhand I don't know of anything that relies on this ordering.
Tom