News for hackers. Stuff that matters.
Re:I made JSON.parse() 2x faster by radex on Saturday March 04, 2023 @06:01PM (#35025377)
That could be interesting! Curious: are you taking about a plain object spread, or are you talking about JSX spreads? The latter has more overhead. Also, which JS engine?

BTW. I recently measured the spread operator in a microbenchmark. Interestingly, while the native spread was faster on Hermes and JSC, it was slower on V8/Chrome, and it's faster there to use `Object.assign()`, i.e.:

['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }]

There are no comments on this comment yet.