This is the mail archive of the
mailing list for the Java project.
Re: Speeding up method searches
Tom Tromey wrote:
> Bryce> Right. Actually, it seems to me that the collector already
> Bryce> doesn't consider the pointers in the intern table for marking,
> Bryce> since it is allocated with _Jv_AllocBytes which is for
> Bryce> "pointer-free" memory. However, there is nothing to remove a
> Bryce> collected string from the hashtable, so we currently get
> Bryce> "random" crashes when calling intern()[*].
> What if we replace the hash table in natString.cc with a
I don't think so. Interned strings should still be collectable, right?
Maybe we can put a special finalizer in natString.cc and call
_Jv_RegisterFinalizer from String.intern()?
> Does interning have to be very fast? Would the added performance hit
> of this approach be acceptable?
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
[ bryce ]