RFR: 8015522 - CharSequence.codePoints can be faster
Sergey Kuksenko
sergey.kuksenko at oracle.com
Tue Jun 4 03:41:54 PDT 2013
Hi
JavaDoc to the method says: "If the sequence is mutated while the stream
is being read, the result is undefined."
What about exceptions? If the sequence is mutated and length becomes
smaller you'll get IndexOutOfBoundsException in forEachRemaining method.
On 06/04/2013 12:33 AM, Henry Jen wrote:
> Hi,
>
> Please review
> http://cr.openjdk.java.net/~henryjen/tl/8015522.0/webrev/
>
> This webrev is based on previous suggestion from Martin Buchholz while
> keep the lazy-binding nature without seize the length at construction time.
>
> The benchmark shows ~50% performance increase, mainly from reduce of
> operation, for example, inline block.accept instead of store the
> character to a local var also helps.
>
> Cheers,
> Henry
>
--
Best regards,
Sergey Kuksenko
More information about the lambda-dev
mailing list