News for hackers. Stuff that matters.
Re:The cost of parsing JSON by TwoNineA on Wednesday September 18, 2019 @11:04AM (#21006145)
Does this apply to other JS engines or only V8?
Re:The cost of parsing JSON by jchw on Wednesday September 18, 2019 @11:07AM (#21006175)
Look at the chart specifically:

> JSON.parse('…') is much faster to parse, compile, and execute compared to an equivalent JavaScript literal — not just in V8 (1.7× as fast), but in all major JavaScript engines.

Re:The cost of parsing JSON by yvan on Wednesday September 18, 2019 @11:07AM (#21006177)
There is a graph on the article showing the other JS engines and yes, it parses faster.
Re:The cost of parsing JSON by jakelazaroff on Wednesday September 18, 2019 @11:05AM (#21006156)
> JSON.parse('…') is much faster to parse, compile, and execute compared to an equivalent JavaScript literal — not just in V8 (1.7× as fast), but in all major JavaScript engines.
Re:The cost of parsing JSON by djsumdog on Wednesday September 18, 2019 @11:07AM (#21006172)
I was wondering that too. No mention of Firefox or Safari. There is more than one browser/render engine out there. Don't design for the monoculture.
Re:The cost of parsing JSON by jchw on Wednesday September 18, 2019 @11:08AM (#21006194)
JavascriptCore, Chakra and Spidermonkey appear in the benchmark...
Re:The cost of parsing JSON by djsumdog on Wednesday September 18, 2019 @11:14AM (#21006258)
ah I totally missed that! It's a link to their other benchmarks under the main graph; easy to miss:

https://github.com/GoogleChromeLabs/json-parse-benchmark

Re:The cost of parsing JSON by kllrnohj on Wednesday September 18, 2019 @12:49PM (#21007235)
The graph in the article itself also has the other engines. You don't have to follow any link.