Changes between Version 3 and Version 4 of JavaScript performance improvement ideas


Ignore:
Timestamp:
Oct 19, 2007 9:39:39 PM (14 years ago)
Author:
mjs@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JavaScript performance improvement ideas

    v3 v4  
    2121 * Scalable Array implementation so that JS arrays don't just "fall off the cliff" when they get over the size threshold. One possible idea is that you expand the storage if items are added close to the current end of the storage. Another possibility is using a more general sparse array implementation.
    2222
    23 * Lightweight type inference. A lot of operators take needless virtual calls and branches because they behave differently depending on whether the operands are strings or numbers, etc. A lot of this can be eliminated based on even the most basic knowledge of operand types, which can be inferred based on constants in the code and output types of operators.
     23 * Lightweight type inference. A lot of operators take needless virtual calls and branches because they behave differently depending on whether the operands are strings or numbers, etc. A lot of this can be eliminated based on even the most basic knowledge of operand types, which can be inferred based on constants in the code and output types of operators.
    2424
    25 * Micro-optimize double --> JSImmediate and JSImmmediate --> int conversions.
     25 * Micro-optimize double --> JSImmediate and JSImmmediate --> int conversions.
    2626
    27 * Where possible, combine toPrimitive() conversion with later toString() / toNumber() call.
     27 * Where possible, combine toPrimitive() conversion with later toString() / toNumber() call.