4 ms·
this jsperf revision is slightly more interesting to me http://jsperf.com/json-vs-transit/3 http://jsperf.com/json-vs-transit/3 it's effectively the same input
by phpnode 12y ago
this jsperf revision is slightly more interesting to me http://jsperf.com/json-vs-transit/3 http://jsperf.com/json-vs-transit/3
it's effectively the same input, but optimised for JSON.parse() rather than transit. This means it purely decodes into objects with fast properties (in V8 at least), so objects never have to undergo the -> hash table transition. It seems consistently faster, but you can argue that it's not doing quite the same thing.
- swannodette 12y agoThese results aren't actually that different when you include all the other browsers. In fact when you look at Chrome 38 (Canary) the results are exactly the same for both versions of the benchmark. As a general rule the optimizations in transit-js take all browsers into consideration - not any particular one.