Ignore:
Timestamp:
Jul 24, 2013, 9:03:36 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: GC's put_by_id transition fixpoint should converge more quickly
https://bugs.webkit.org/show_bug.cgi?id=117912

Reviewed by Mark Hahnenberg.

This was a rookie mistake. The GC does a classic forward data flow fixpoint. These work well so long as you
iterate the program in program order, or at least something close to program order. Because I enjoy reverse
loops ("while (n--) blah"), I ended up iterating in *reverse* of program order which ensured worst-case
pathologies every single time. And unsurprisingly, this slowed down a program, namely pdfjs.

Flipping the loops to iterate forward fixes a 90% regression in Octane/pdfjs and is otherwise neutral.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::propagateTransitions):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r153237 r153243  
    19731973    if (jitType() == JITCode::InterpreterThunk) {
    19741974        const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
    1975         for (size_t i = propertyAccessInstructions.size(); i--;) {
     1975        for (size_t i = 0; i < propertyAccessInstructions.size(); ++i) {
    19761976            Instruction* instruction = &instructions()[propertyAccessInstructions[i]];
    19771977            switch (interpreter->getOpcodeID(instruction[0].u.opcode)) {
     
    19951995#if ENABLE(JIT)
    19961996    if (JITCode::isJIT(jitType())) {
    1997         for (unsigned i = m_structureStubInfos.size(); i--;) {
     1997        for (unsigned i = 0; i < m_structureStubInfos.size(); ++i) {
    19981998            StructureStubInfo& stubInfo = m_structureStubInfos[i];
    19991999            switch (stubInfo.accessType) {
Note: See TracChangeset for help on using the changeset viewer.