Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created November 4, 2012 02:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/4009799 to your computer and use it in GitHub Desktop.
Save bnoordhuis/4009799 to your computer and use it in GitHub Desktop.
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
@bnoordhuis
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment