Ignore:
Timestamp:
Apr 30, 2009, 4:36:38 PM (16 years ago)
Author:
[email protected]
Message:

2009-04-30 Maciej Stachowiak <[email protected]>

Reviewed by Gavin Barraclough.

  • Concatenate final three strings in simple replace case at one go

~0.2% SunSpider speedup

  • runtime/StringPrototype.cpp: (JSC::stringProtoFuncReplace): Use new replaceRange helper instead of taking substrings and concatenating three strings.
  • runtime/UString.cpp: (JSC::UString::replaceRange): New helper function.
  • runtime/UString.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/UString.h

    r43090 r43104  
    245245        UString spliceSubstringsWithSeparators(const Range* substringRanges, int rangeCount, const UString* separators, int separatorCount) const;
    246246
     247        UString replaceRange(int rangeStart, int RangeEnd, const UString& replacement) const;
     248
    247249        UString& append(const UString&);
    248250        UString& append(const char*);
Note: See TracChangeset for help on using the changeset viewer.