From: Godmar Back (gback@cs.utah.edu)
Date: Sat Dec 19 1998 - 15:54:45 EST
Archie,
>
> Godmar Back writes:
> > Keep in mind that applications that are string intensive will mostly
> > be written to use String.intern(). This applies for instance to Kawa.
>
> Yes.. and with shared arrays, this would be a trivial operation.
This is a bogus argument. You pay the price for interning whether
you always do it or whether you only do it if the application asks you.
String.intern() is not the frequent operation that must be optimized.
>
> On the other hand, since Sun has decided that the application should
> be responsible for interning (probably the right choice) then I
> suppose we should go along with that and not be 'preemptive'.
But I really think we would win big for utf8const. I think we would even
win big without a heuristics to avoid interning those for which it
wouldn't pay off. It would be great if you wanted to implement this.
(Here's your christmas project... ;-)
About your comment on String.substring in an earlier mail: from
looking at String.java, it seems that substring already share the
char array from their enclosing string.
- Godmar
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:24 EDT