On Thursday, October 4, 2012 5:13:30 AM UTC+5:30, Ben Noordhuis wrote: > > > Don't use buf.readUInt8(), it's only there for the sake of parity with > the other .readUInt*() functions. Replace it with `a = buf[b]` and > you'll see a 4-5x speed-up. >
Excellent suggestion Ben: New results are exciting :) Buffer reads 21 ms Array reads 29 ms What about the other functions like readUIntXX and readIntXX ,I may not be able to use indexing in those cases. Or will they be as fast as using indexing? -- 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
