News for hackers. Stuff that matters.
Re:It's like JSON. but fast and small. by dtf on Saturday December 29, 2012 @08:19AM (#4982000)
The JavaScript msgpack codec is a couple of years old now, by the looks of the github repository. I see a custom base64 function, and no use of typed arrays. I wonder if these numbers might change a little given more modern features like typed arrays and fetching arraybuffers via XHR2.

Biggest issue for me with JSON is needing to base64 any binary data, so msgpack could actually be quite useful.

Re:It's like JSON. but fast and small. by benatkin on Saturday December 29, 2012 @08:51AM (#4982069)
I noticed that opportunity too. If anyone is looking for a fun project...

The next thing would be to have practices and/or libraries that switch techniques based on browser support.

Re:It's like JSON. but fast and small. by creationix on Saturday December 29, 2012 @09:37AM (#4982156)
Re:It's like JSON. but fast and small. by shadytrees on Saturday December 29, 2012 @02:08PM (#4983034)
Question out of curiosity: did you notice any performance improvements from using DataView and ArrayBuffer?
Re:It's like JSON. but fast and small. by creationix on Monday December 31, 2012 @08:27AM (#4989232)
I never used the "official" js codec because it didn't exist when I started. My codec has been optimized for nodejs and does rather well there. I recently did a jsperf for the browser port (msgpack-js-vs-json) and while slower than the nodejs version, it looks a bit faster than the "official" one.