Title: [292322] branches/safari-613-branch/Source/_javascript_Core/runtime
Revision
292322
Author
alanc...@apple.com
Date
2022-04-04 14:54:46 -0700 (Mon, 04 Apr 2022)

Log Message

Cherry-pick r288537. rdar://91259284

    Remove VM::stringCache
    https://bugs.webkit.org/show_bug.cgi?id=235536

    Reviewed by Sam Weinig.

    We consult VM::stringCache when creating a JSString, but since
    bug 142115 we never insert anything into it.

    Removing this results in almost-significant improvements in the VueJS,
    Vanilla-ES2015, and jQuery sub-tests of Speedometer 2 (of 0.5-2%,
    0.03 <= p <= 0.05), and an almost significant 0.2% improvement in the
    overall score (p = 0.06).

    runtime/JSString.cpp:
    (JSC::jsStringWithCacheSlowCase):

    runtime/VM.cpp:
    (JSC::VM::VM):

    runtime/VM.h:

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/_javascript_Core/runtime/JSString.cpp (292321 => 292322)


--- branches/safari-613-branch/Source/_javascript_Core/runtime/JSString.cpp	2022-04-04 21:52:56 UTC (rev 292321)
+++ branches/safari-613-branch/Source/_javascript_Core/runtime/JSString.cpp	2022-04-04 21:54:46 UTC (rev 292322)
@@ -436,9 +436,6 @@
 
 JSString* jsStringWithCacheSlowCase(VM& vm, StringImpl& stringImpl)
 {
-    if (JSString* string = vm.stringCache.get(&stringImpl))
-        return string;
-
     JSString* string = jsString(vm, String(stringImpl));
     vm.lastCachedString.set(vm, string);
     return string;

Modified: branches/safari-613-branch/Source/_javascript_Core/runtime/VM.cpp (292321 => 292322)


--- branches/safari-613-branch/Source/_javascript_Core/runtime/VM.cpp	2022-04-04 21:52:56 UTC (rev 292321)
+++ branches/safari-613-branch/Source/_javascript_Core/runtime/VM.cpp	2022-04-04 21:54:46 UTC (rev 292322)
@@ -218,7 +218,6 @@
     , propertyNames(nullptr)
     , emptyList(new ArgList)
     , machineCodeBytesPerBytecodeWordForBaselineJIT(makeUnique<SimpleStats>())
-    , stringCache(*this)
     , symbolImplToSymbolMap(*this)
     , structureCache(*this)
     , interpreter(nullptr)

Modified: branches/safari-613-branch/Source/_javascript_Core/runtime/VM.h (292321 => 292322)


--- branches/safari-613-branch/Source/_javascript_Core/runtime/VM.h	2022-04-04 21:52:56 UTC (rev 292321)
+++ branches/safari-613-branch/Source/_javascript_Core/runtime/VM.h	2022-04-04 21:54:46 UTC (rev 292322)
@@ -585,7 +585,6 @@
     SmallStrings smallStrings;
     NumericStrings numericStrings;
     std::unique_ptr<SimpleStats> machineCodeBytesPerBytecodeWordForBaselineJIT;
-    WeakGCMap<StringImpl*, JSString, PtrHash<StringImpl*>> stringCache;
     Strong<JSString> lastCachedString;
     JSONAtomStringCache jsonAtomStringCache;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to