On Fri, Oct 5, 2012 at 1:08 AM, NodeNinja <[email protected]> wrote:
> On Friday, October 5, 2012 1:58:17 AM UTC+5:30, Dan Milon wrote:
>> Curious, shouldn't V8 be able to inline the readUInt8 function call, or
>> there's more than that?
>>
> That's what even I was thinking about if all the buf.read*() and the
> buf.write*() functions are much slower than the indexed version. Possibly
> Ben would know better about this.

The read*() and write*() functions do more than simple stores and
loads, they also perform (optional) error checks and byte swaps.
Besides, they're pure JS functions while buf[i] is an intrinsic. Can't
compete with that. :-)

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to