Hi @ChromiumDev, previously code like `new ArrayBuffer(LARGE_NUMBER)` took several hundred milliseconds to execute. With todays Canary it doesn’t even take a single millisecond. How is that possible?
v8 when embedded in Chromium uses the pre-initialized memory, yes. We get the zeroed pages from the OS, so it will just zero the page on demand (essentially as slow as memset) if there is no more pre-initialized memory left.
-
-
It might be a stupid question, but is this likely to happen or is it almost impossible to run out of pre-initialized memory? I’m asking because I wonder if I should deprecate my async-array-buffer package or not.
-
I think it will always be faster or the same speed without the workers now, for chromium. In Node.js, the allocator calls system calloc() directly so it depends on the system allocator, but I suspect that is also faster. If not, we should fix it there too, so it's fast by default
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.