Sponsor for 6666666: A better implementation of Character.isSupplementaryCodePoint
Ulf Zibis
Ulf.Zibis at gmx.de
Tue Mar 16 20:27:05 UTC 2010
Am 13.03.2010 00:29, schrieb Martin Buchholz:
> OK, next round of review.
>
> I changed my UTF-8 changes to be behavior-preserving,
> removing any hint of controversy, and renamed the patch
> to "utf8-twiddling".
>
> I got Ulf in my head, and can't stop micro-optimizing.
> I added a new micro-optimizing patch for Bits.java.
> Please file a bug.
>
> 6934268: Better implementation of Character.isValidCodePoint and
> isSupplementaryCodePoint()
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/isSupplementaryCodePoint
>
Won't you like to add:
* <p><b>Note:</b> In combination with {@link #isBMPCodePoint(int)}
this
* method should be in 2nd place to permit additional HotSpot compiler
* optimization. Example:
* <blockquote><pre>
* if (Character.isBMPCodePoint(codePoint))
* ...;
* else if (Character.isSupplementaryCodePoint(codePoint))
* ...;
* else
* ...;
* </pre></blockquote>
*
> 6934265: Add public method Character.isBMPCodePoint
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/public-isBMPCodePoint
>
Additionally please move static final int SIZE = 16 to one of the first
lines of the code.
See: https://bugs.openjdk.java.net/attachment.cgi?id=178&action=diff
> 6934270: Remove javac warnings from Character.java
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/Character-warnings
> 6934271: Better handling of longer utf-8 sequences
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/utf8-twiddling
> 6666666: Optimize bit-twiddling in Bits.java
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/Bits.java
>
Hm, I can't see any difference that would merit to see it as
micro-optimization. Am I blind?
> Now I need to go off to my micro-optimizers-anonymous meeting.
>
Oh, you are coming to Cologne, Germany. Nice to meet you personally.
-Ulf
More information about the core-libs-dev
mailing list