Speeding up method searches
Per Bothner
per@bothner.com
Tue Apr 11 23:54:00 GMT 2000
Bryce McKinlay <bryce@albatross.co.nz> writes:
> I would say that Interning should be as fast as possible if we are going
> to be calling it on every method name and signature of every initialized
> class.
Since this only happens when a class is initialized, speed is
important but perhaps not that critical. I'm even more concerned
about space. Using a general Hashtable is wsteful in terms of space:
Each entry in the hashtable has both a key and a value. In the intern
table, the key and the value are the same. Thus using a Hashtable
would waste *at least* one pointer field for each interned String.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/
More information about the Java
mailing list