Codereview request: CR 7040220 java/char_encodin Optimize UTF-8 charset for String.getBytes()/toCharArray()

Neil Richards neil.richards at
Fri Apr 29 16:47:29 UTC 2011

On 28 April 2011 12:01, Alan Bateman <Alan.Bateman at> wrote:
> I skimmed through the webrev and I agree this is a better approach. I will
> try to do a detailed review before Monday. It would be great if others on
> the list could jump in and help too as we are running out of time.
> Neil - I don't know if you've had a chance to look at Sherman's changes but
> I think it's better than checking if mUTF-8 can be used.  If you agree then
> would you have time to run your tests that altered you to this performance
> regression? There's a patch file in the webrev.

Hi Sherman,
Thank you for responding so quickly to my post.

I realise that my suggested change was quite restricted in its scope -
it was designed so it could be considered easily (in the hope it might
make it through the OpenJDK 7 gates before they finally clang shut).

However, it's evident from your response that you have been thinking
about possible enhancements in this area, and I agree that your
proposed change addresses the issue in a more comprehensive - and
strategic - manner.

>From the testing I've been able to look at thus far, your proposed
change seems to address the performance penalty which had caused me to
raise the matter.

Given this, I'd be delighted if it is adopted into OpenJDK 7,
Thanks once again,

Unless stated above:
IBM email: neil_richards at
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

More information about the core-libs-dev mailing list