Changes between Version 9 and Version 10 of JavaScript performance improvement ideas


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

--

Legend:

Unmodified
Added
Removed
Modified
  • JavaScript performance improvement ideas

    v9 v10  
    2424 * 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.
    2525
    26  * Micro-optimize double --> JSImmediate and JSImmmediate --> int conversions.
    27 
    28  * Where possible, combine toPrimitive() conversion with later toString() / toNumber() call.
     26 * Where possible, combine toPrimitive() conversion with later toString().
    2927
    3028 * A possible speedup for numbers: NumberImps could get allocated on separate special collector blocks, using half the normal cell size.  When sweeping a number block, you never call destructors, since the NumberImp destructor does nothing. When making, you know that any object in the number page never really needs mark() called, it can just set the mark bit and go because it has no children to mark
    31