Ignore:
Timestamp:
Apr 25, 2014, 11:00:43 PM (11 years ago)
Author:
[email protected]
Message:

Inline (C++) GetByVal with numeric indices more aggressively.
<https://webkit.org/b/132218>

We were already inlining the string indexed GetByVal path pretty well,
while the path for numeric indices got neglected. No more!

~9.5% improvement on Dromaeo/dom-traverse.html on my MBP:

Before: 199.50 runs/s

After: 218.58 runs/s

Reviewed by Phil Pizlo.

  • dfg/DFGOperations.cpp:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::get):

ALWAYS_INLINE all the things.

  • runtime/JSObject.h:

(JSC::JSObject::getPropertySlot):

Avoid fetching the Structure more than once. We have the same
optimization in the string-indexed code path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h

    r167405 r167842  
    684684}
    685685
    686 inline JSValue JSValue::get(ExecState* exec, unsigned propertyName) const
     686ALWAYS_INLINE JSValue JSValue::get(ExecState* exec, unsigned propertyName) const
    687687{
    688688    PropertySlot slot(asValue());
     
    690690}
    691691
    692 inline JSValue JSValue::get(ExecState* exec, unsigned propertyName, PropertySlot& slot) const
     692ALWAYS_INLINE JSValue JSValue::get(ExecState* exec, unsigned propertyName, PropertySlot& slot) const
    693693{
    694694    // If this is a primitive, we'll need to synthesize the prototype -
Note: See TracChangeset for help on using the changeset viewer.