3 ms·
Do 1,2,3,4,5,6,7,8 have good, performant implementations in JavaScript - a programming language that many services have to communicate with today?
by swannodette 12y ago
Do 1,2,3,4,5,6,7,8 have good, performant implementations in JavaScript - a programming language that many services have to communicate with today?
- michaelmior 12y agoIf the answer is to this question is no, the answer to whether or not a new format is necessary is not automatically yes. Certainly for at least one of those formats, a reasonably performant JS implementation could be created.
- swannodette 12y agoWe assessed what prior work had been done and found these attempts to ultimately be unsatisfactory performance-wise for the breadth of JavaScript clients we would like to reach.
- nimish 12y agoI would love to see this data--it would help me greatly when picking a format that needs to work.
- swannodette 12y agohttp://jsperf.com/json-bson-msgpack/2 http://jsperf.com/json-bson-msgpack/2 Look at JSPerf for other serialization formats vs. JSON. They all look pretty much like this. Compare these results to http://jsperf.com/json-vs-transit/2 http://jsperf.com/json-vs-transit/2 where in some cases we beat JSON.
- kybernetikos 12y agoWe have also found that none of the common serialization formats perform acceptably in javascript except JSON (and that's huge on the wire). As an aside, transit seems dramatically faster in v8 than in firefox, at least in the versons of browsers I'm using, despite the fact that JSON.parse and hydrate are faster in firefox. Has it been specially optimised for v8?
- swannodette 12y agoWe did not specifically optimize of for V8, the optimizations present resulted in a performance win in all browsers. Firefox simply does not deliver the same performance as V8 or JavaScriptCore for this kind of work. Still I think Transit is plenty acceptable under Firefox for many typical JavaScript programs. Hopefully the existence and usage of Transit will encourage Firefox to further improve their JavaScript performance profile.
- nimish 12y agoPossibly but in many ways it's a lot easier to pick and write a fast implementation using e.g. typed arrays than it is to convince the world to use your special format
- swannodette 12y agoDo typed arrays work in the last 14 years of browser technology or JavaScript environments?
- nimish 12y agoIt would be very nice if y'all gave a detailed rationale mentioning things like this over "we made a cool new format" I still am not seeing why the other formats fail, especially with the very limited compression that you have baked into the spec (!) Where are the benchmarks on ie6 era browsers? And why should I let ie6 era perf direct my future data format design?