Then to reiterate, leave all the old code in. Replacing highly optimized
code with a generic that depends on multiple loops and multiplications that
can't be inlined isn't acceptable.
On May 23, 2014 6:40 PM, "Yazhong Liu" <notifications@github.com> wrote:

> In lib/buffer.js:
>
> >    offset = offset >>> 0;
> >    if (!noAssert)
> > -    checkOffset(offset, 1, this.length);
> > -  return this[offset];
> > +    checkOffset(offset, byteLength, this.length);
> > +  var i = byteLength || 1;
> > +  var val = this[offset];
> > +  while (--i) {
> > +    var offset2 = 1;
> > +    for (var j = 0; j < i; j++) {
> > +      offset2 *= 0x100;
>
> mm, it could not be work well, because:
>
> > 0x01 << 8 << 8 << 8  << 8
> 0
> > 0x01 * 0x100 * 0x100 * 0x100 * 0x100
> 4294967296
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/joyent/node/pull/7596/files#r13024301>
> .
>