On Friday, October 5, 2012 12:29:00 PM UTC+5:30, Jimb Esser wrote: > > The gist of it is just to take a Buffer, for each type you want to read > (say, e.g, 32-bit ints), make a number of views equal to the possible byte > offsets (e.g. 4) and then do a read with the right offset from the right > view (e.g. view[offset % 4][offset >> 2]). V8 does "indexed properties to > external data" lookups super-fast (Buffers use this), so this ends up being > much faster than doing the JS operations to reconstruct a primitive type > from multiple reads. >
Hello Jimb, I haven't used typed arrays as yet, so are you making a performance comparison of some sorts here between Typed Arrays and Buffers. Is a Typed Array at par with Buffer when for reading / writing uint32 or int32 values? -- 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
