3 ms·
It would've been interesting to know which platform was the JavaScript test performed on (judging by source code, likely Node.js). However, on my current machin
by vesinisa 7y ago
It would've been interesting to know which platform was the JavaScript test performed on (judging by source code, likely Node.js). However, on my current machine Chrome chokes to stack overflow above nesting level 125,778.
More amazingly, Firefox is currently happily parsing a JSON array with 50,000,000 levels of nesting at full CPU single core utilization and consuming about 12 GB of memory. This was after an array of depth 10,000,000 was successfully parsed after peaking around ~8 GB of RAM. So Firefox's parser seems to be only constrained by available memory!
Also - while this is running in the console the Firefox UI is completely usable and I can browse the web in another tab. Mozilla has come a long way!
E: The 50,000,000 nesting level array parsing eventually failed with "Error: out of memory".