• You might be running out due to the intermediate representation. Pretend you're a parser and look at

    var x = new Uint8Array(["blah","blah",....])

    Before we can evaluate that, we have to read in that bit between the []'s, which creates a standard array (1 or 2 jsvars per item). Then that gets passed to the Uint8Array constructor, which returns something much smaller. Plus it needs to store the big blob of text while it parses it...

    So while your final structure may be small (I think it comes out to 12 bytes per jsvar? Or does it use flat strings for more efficiency now?), you can end up with higher memory usage while processing it.

About

Avatar for DrAzzy @DrAzzy started