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

Ulf Zibis Ulf.Zibis at gmx.de
Tue Oct 11 06:22:14 PDT 2011


Am 11.10.2011 13:36, schrieb Ulf Zibis:
>
>> 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         }
>
Another 3rd variant to compare for performance:
(needs only 1 constant to load in cpu register, and is a 1-byte op code)

   87         private static boolean isNotContinuation(byte b) {
   88             return b >= (byte)0xc0;
   89         }

-Ulf



More information about the i18n-dev mailing list