Codereview request for 7096080: UTF8 update and new CESU-8 charset

Ulf Zibis Ulf.Zibis at
Tue Oct 11 11:36:57 UTC 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
(would reduce the effort, checking the hex values manually, each time while reading)

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


More information about the core-libs-dev mailing list