Ignore:
Timestamp:
Oct 15, 2008, 9:36:12 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-15 Cameron Zwarich <[email protected]>

Reviewed by Maciej Stachowiak.

Bug 21633: Avoid using a HashMap when there is only a single transition
<https://bugs.webkit.org/show_bug.cgi?id=21633>

This is a 0.8% speedup on SunSpider and between a 0.5% and 1.0% speedup
on the V8 benchmark suite, depending on which harness we use. It will
also slightly reduce the memory footprint of a StructureID.

  • kjs/StructureID.cpp: (JSC::StructureID::StructureID): (JSC::StructureID::~StructureID): (JSC::StructureID::addPropertyTransition):
  • kjs/StructureID.h: (JSC::StructureID::):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/StructureID.h

    r37563 r37627  
    153153
    154154        size_t m_transitionCount;
    155         TransitionTable m_transitionTable;
     155        bool m_usingSingleTransitionSlot;
     156        union {
     157            StructureID* singleTransition;
     158            TransitionTable* table;
     159        } m_transitions;
    156160
    157161        RefPtr<PropertyNameArrayData> m_cachedPropertyNameArrayData;
Note: See TracChangeset for help on using the changeset viewer.