Get the latest tech news

How we made JSON.stringify more than twice as fast


This post explains our recent effort to improve JSON.stringify performance

A "side effect" in this context is anything that breaks the simple, streamlined traversal of an object.This includes not only the obvious cases like executing user-defined code during serialization, but also more subtle internal operations that might trigger a garbage collection cycle. This allows it to bypass many expensive checks and defensive logic required by the general-purpose serializer, resulting in a significant speedup for the most common types of JavaScript objects that represent plain data. For the vast majority of use cases, such as serializing data for API responses or caching configuration objects, these conditions are naturally met, allowing developers to benefit from the performance improvements automatically.

Get the Android app

Or read this on Hacker News