[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch 620

From: Anthony Green
Subject: Re: patch 620
Date: 02 Dec 2002 22:18:30 -0800

On Thu, 2002-11-28 at 05:37, Stephen Crawley wrote:
> Here are a couple of theoretical reasons why interning (in general)
> could have negative performance implications, for Kissme at least.
>   *  I believe that Classpath's String interning uses a weak hashmap.
>      Unfortunately, Kissme does not support weak references yet.  Instead
>      it treats weak references as ordinary references.  This means that
>      Kissme cannot garbage collect any String that has been interned.

I see.  Well, in practice there's going to be a real limit to the number
of Locale's a program will ever see - so I don't see this as a real

>   *  You may be aware that the Kissme VM includes an implementation of
>      orthogonal persistence.  In one possible configuration of Kissme
>      O-P, static fields of classes get automatically saved to the
>      persistent store.  This would include String's interning data
>      structures.  Thus interned Strings would last "for ever" in the
>      store.  

I think the same comment applies here.  This doesn't really seem like a
bad thing.

> Note: I'm not saying "don't intern these locale Strings".  If there is
> a demonstrable performance benefit, go for it.

If anywhere there was a use for string interning, I think this is it. 
We're talking about  up to three inline pointer comparisons -vs- up to
three expensive String comparison function calls on each Locale
comparison, and there's a real and practical limit to the number of
strings we'd be interning.

Tom - what would you like to see in order to accept this patch?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]