RFR: 8015522 - CharSequence.codePoints can be faster (original) (raw)
Sergey Kuksenko sergey.kuksenko at oracle.com
Tue Jun 4 10:41:54 UTC 2013
- Previous message: RFR: 8015522 - CharSequence.codePoints can be faster
- Next message: hg: jdk8/tl/langtools: 8013405: DocLint should support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: RFR: 8015522 - CharSequence.codePoints can be faster
- Next message: hg: jdk8/tl/langtools: 8013405: DocLint should support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]