I don’t know who needs to hear this but, having been looking at performance characteristics of JSON in Node.js today:

- JSON.stringify (synchronous) is blisteringly fast on regular JavaScript objects/arrays, etc.
- JSON.stringify is an order of magnitude slower when used with Proxy
- The fastest yielding module I could find (yieldableJSON) is an order of magnitude slower than JSON.stringify.

Also, { performance } = require('perf_hooks'); performance.now() is your friend ;)

Follow

PS. Missing const in const { performance } …

· · Web · 0 · 1 · 1
Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!