Sponsor for 6666666: A better implementation of Character.isSupplementaryCodePoint
Ulf Zibis
Ulf.Zibis at gmx.de
Wed Mar 17 01:20:35 UTC 2010
Am 16.03.2010 21:46, schrieb Martin Buchholz:
> On Tue, Mar 16, 2010 at 13:27, Ulf Zibis<Ulf.Zibis at gmx.de> wrote:
>
>> Am 13.03.2010 00:29, schrieb Martin Buchholz:
>>
>> 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>
>> *
>>
> No.
>
> This kind of implementation-specific comment is not
> traditionally put in public javadoc (it's considered OK
> in private comments). Also, we should not inflict our
> dangerous micro-optimization disease on others.
>
Hm, I believe I've seen similar things in javadoc, but I can agree
dropping the <blockqoute> part.
Would "In combination with {@link #isBMPCodePoint(int)} this method
should be in 2nd place to permit additional VM optimization." be better?
-Ulf
More information about the core-libs-dev
mailing list