From: Archie Cobbs (archie@whistle.com)
Date: Sat Dec 19 1998 - 17:56:37 EST
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.
Right... just seeing if you were paying attention :-)
> > 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... ;-)
I would be willing to try it (if I have time). I'd like to do it
in a new file "utf8.c", to separate it out the UTF-8 stuff from the
java.lang.String stuff in "string.c".
In any case I'll send out patches for review before comitting anything.
> 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.
OK.. so that's already optimized.
Cheers,
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:24 EDT