[kaffe] quick question method lookups
Patrick Tullmann
tullmann at cs.utah.edu
Fri Aug 2 14:12:12 PDT 2002
gonzo wrote:
> in the verifier i'm attempting to figure out of a method in a class has
> been overriden by a subclass (for finding out if final methods have been
> overriden, which is bad). right now i'm doing string comparrisons
> (gasp!).
I wouldn't worry too much about the performance of the verifier to
start with... wait and benchmark it. The vast majority of classes
don't have a significant number of methods, so I doubt a linear search
is really problematic. Sorting the methods on the Class by name and
doing a binary search would be a bit faster than the current, with no
space overhead. (Plus some overhead to sort in the first place, of
course).
I think the code that matches interface methods to implemented class
methods has to do a lot of string compares, so whatever your solution,
you could probably improve that code, too. See
classMethod.c:buildInterfaceDispatchTable.
-Pat
----- ----- ---- --- --- -- - - - - -
Pat Tullmann tullmann at cs.utah.edu
Indifference may cause the downfall of mankind, but who really cares?
More information about the kaffe
mailing list