8011135: (bf) CharBuffer.put(String) is slow because of String.charAt() call for each char

Brian Burkhalter brian.burkhalter at oracle.com
Fri Feb 22 15:18:44 UTC 2019

> On Feb 22, 2019, at 3:16 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 21/02/2019 20:30, Brian Burkhalter wrote:
>> I created a webrev including an updated benchmark:
>> http://cr.openjdk.java.net/~bpb/8011135/webrev/ <http://cr.openjdk.java.net/~bpb/8011135/webrev/>This version looks good.
> Claes might have some comments on the microbenchmark, my only comment that future maintainers might wonder about the +42 and also why the position is reset to 21 (I assume it would be buf.clear(); buf.put(str);

No good reason really. The 21 and 42 can be removed if we like.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190222/657f8afd/attachment.html>

More information about the nio-dev mailing list