Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis bnoordhuis/1.js
Created Nov 4, 2012

What would you like to do?
v8 big array performance bugs
for (var a = [], i = 0; i < 64*1024*1024; ++i) a.push(123.456);
for (var a = [123.456], i = 0; i < 64*1024*1024; ++i) a.push(123.456);
$ time out/native/d8 tmp/big-array/1.js
real 0m3.672s
user 0m3.176s
sys 0m0.452s
$ time out/native/d8 tmp/big-array/2.js
# Fatal error in CALL_AND_RETRY_0
# Allocation failed - process out of memory
Trace/breakpoint trap (core dumped)
real 0m52.356s
user 0m51.995s
sys 0m0.416s

This comment has been minimized.

Copy link
Owner Author

commented Nov 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.