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


Reply via email to