> -Original Message-
> From: Robert Lougher [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 29, 2006 5:28 AM
> To: harmony-dev@incubator.apache.org
> Subject: Re: Re: [drlvm] string interning in java
>
> On 7/29/06, Nathan Beyer <[EMAIL PROTECTED]> wrote:
On 29/07/06, Salikh Zakirov <[EMAIL PROTECTED]> wrote:
Still, we need to have this functionality, because it is in spec.
True, intern() is part of the spec, and GC-intern() will be much better :-)
> However, by hard-coding the message like this, you're
> guaranteeing that the VM will intern()
On 29/07/06, Robert Lougher <[EMAIL PROTECTED]> wrote:
Which implies that freeing of the dynamically loaded string when the
class is unloaded is something special. It is not. Nor is an
interned string a memory leak. It will be collected when there are no
more references to it like any other o
On 7/29/06, Nathan Beyer <[EMAIL PROTECTED]> wrote:
> -Original Message-
> From: Robert Lougher [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 28, 2006 7:40 PM
> To: harmony-dev@incubator.apache.org
> Subject: Re: Re: [drlvm] string interning in java
>
&g
On 29/07/06, Robert Lougher <[EMAIL PROTECTED]> wrote:
The interned String table should be garbage-collected. If the only
reference to an interned String is from the class constant pool it
will be collected when the class is unloaded. If the intern table is
preventing Strings from being collect
> -Original Message-
> From: Robert Lougher [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 28, 2006 7:40 PM
> To: harmony-dev@incubator.apache.org
> Subject: Re: Re: [drlvm] string interning in java
>
> Hi,
>
> On 7/29/06, Alex Blewitt <[EMAIL PROTECTED]&g
Hi,
On 7/29/06, Alex Blewitt <[EMAIL PROTECTED]> wrote:
On 28/07/06, Salikh Zakirov <[EMAIL PROTECTED]> wrote:
> Alex Blewitt wrote:
Importantly, it explains why the Eclipse NLS class uses static string
variables to refer to messages, and not to String literals for exactly
this reason. If you u
On 28/07/06, Salikh Zakirov <[EMAIL PROTECTED]> wrote:
Alex Blewitt wrote:
> There's a heck of a lot wrong with intern()
My original observation was that interning makes perfect sense
for localized log messages, because the code like
println(MessageBundle.get("how are you?"));
Yes, but I
There's a heck of a lot wrong with intern().
1) People claim inefficiencies, without actually measuring them (see
other points I've made about permature optimisation)
2) The claim that performing an intern() reduces comparisons (because
you just do a pointer compare) is, in most cases, completely