Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 16 lines (12 sloc) 0.676 kb
b65597d @tj add v8.perf.md
authored
1
2 # V8 Performance Tips
3
4 A collection of V8 performance tips from Lars Bak
5
6 - members used should be initialized in the constructor - in a consistent order
7 - avoid monkey-patching which changes the hidden class tree, thus cannot use the same optimized code
8 - 31 bit signed integers (SMIs) when possible for calculations
9 - 0-N contiguous element arrays
10 - pre-alloc small arrays
11 - dont pre-alloc large arrays, switches to hash-mode
12 - arrays of doubles can be unboxed
13 - intiialize arrays using array literals to avoid conversions, re-allocations etc
14 - use --trace-opt, --trace-bailout, --trace-deopt, --prof etc
15 - Google\ Chrome --js-flags "--trace-opt ..."
Something went wrong with that request. Please try again.