Speeding up method searches
Tom Tromey
tromey@cygnus.com
Sun Apr 9 21:54:00 GMT 2000
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
More information about the Java
mailing list