<i18n dev> Codereview request for 7096080: UTF8 update and new CESU-8 charset

Ulf Zibis Ulf.Zibis at gmx.de
Tue Oct 11 04:36:57 PDT 2011


Hi Sherman,

I didn't read anything from you since longer time. You are in holidays?

Am 30.09.2011 22:46, schrieb Xueming Shen:
>
> I believe we changed from (b1 < xyz) to (b1 >> x) == -2 back to 2009(?) because
> the benchmark shows the "shift" version is slightly faster. Do you have any number
> shows any difference now. My non-scientific benchmark still suggests the "shift"
> type is faster on -server vm, no significant difference on -client vm.
>
In this sense, then you should do the same here:
   87         private static boolean isNotContinuation(int b) {
   88             return (b >> 6) != -2;
   89         }

... + in all isMalformedxxx().

BTW, in all isMalformedxxx() you could replace all
     (bx & 0xc0) != 0x80
by
     isNotContinuation(bx)
(would reduce the effort, checking the hex values manually, each time while reading)


Additionally:
Make private:
   75     private static final void updatePositions(
   76             Buffer src, int sp, Buffer dst, int dp) {


-Ulf


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/i18n-dev/attachments/20111011/4d8342b1/attachment.html 


More information about the i18n-dev mailing list