Skip to content(if available)orjump to list(if available)

How we made JSON.stringify more than twice as fast

hinkley

JSON encoding is a huge impediment to interprocess communication in NodeJS.

Sooner or later is seems like everyone gets the idea of reducing event loop stalls in their NodeJS code by trying to offload it to another thread, only to discover they’ve tripled the CPU load in the main thread.

I’ve seen people stringify arrays one entry at a time. Sounds like maybe they are doing that internally now.

If anything I would encourage the V8 team to go farther with this. Can you avoid bailing out for subsets of data? What about the CString issue? Does this bring faststr back from the dead?