Changes between Version 51 and Version 52 of squirrelfish


Ignore:
Timestamp:
Apr 7, 2008, 2:20:31 PM (17 years ago)
Author:
oliver@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • squirrelfish

    v51 v52  
    201201
    202202{{{
    203 Revision 31432 was a 1.4% performance regression because it moved the register vector from a local to a parameter. Making the register vector a data member has the same effect. WTF?
    204 
    205 }}}
    206 
     203Revision 31432 was a 1.4% performance regression because it moved the register vector from a
     204local to a parameter. Making the register vector a data member has the same effect. WTF?
     205}}}
     206
     207{{{
     208Exception handling throw logic has to pass vPC to a function, and assign the result to vPC, eg.
     209  if (!(vPC = throwException(codeBlock, k, scopeChain, registers, r, vPC)))
     210But this causes a 25% regression on the above empty-for-loop test, despite never being hit. 
     211To avoid this we need to do:
     212void* throwTarget;
     213...
     214void Machine::privateExecute(..)
     215{
     216    ...
     217    // in address table initialiser
     218    throwTarget = &&gcc_dependency_hack;
     219    ...
     220    BEGIN_OPCODE(op_throw) {
     221        ...
     222        if (!(exceptionTarget = throwException(codeBlock, k, scopeChain, registers, r, vPC))) { ... }
     223        ...
     224        goto *throwTarget;
     225    }
     226    gcc_dependency_hack:
     227    {
     228        vPC = exceptionTarget;
     229        NEXT_OPCODE;
     230    }
     231}
     232
     233Without this _indirect_ goto we get a 25% regression, if we use a direct goto we still get an 18% regression.
     234
     235}}}