WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-213454-20200915200244.patch (text/plain), 19.52 KB, created by
Yusuke Suzuki
on 2020-09-15 20:02:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2020-09-15 20:02:45 PDT
Size:
19.52 KB
patch
obsolete
>Subversion Revision: 267125 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 80c7069f2a51a58d6b53b784efb2a25f492cf9eb..2cf95b554e1811fdcd1f3e2918159eb9e21ba5a1 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,37 @@ >+2020-09-15 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ [JSC] Cache UDateTimePatternGenerator >+ https://bugs.webkit.org/show_bug.cgi?id=213454 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ ICU udatpg_open function is particularly slow. As a result, 80~% of time is used by this function when calling Date#toLocaleString. >+ We should have last-used cache in VM, which covers major cases like, "One locale (possibly default locale) is used and continuously >+ use toLocaleString with that locale". >+ >+ This significantly improves toLocaleString / toLocaleDateString / toLocaleTimeString performance. >+ >+ ToT Patched >+ >+ date-to-locale-string 392.0092+-0.6811 ^ 87.3196+-3.1598 ^ definitely 4.4894x faster >+ date-to-locale-date-string 377.9117+-7.8701 ^ 70.4155+-3.6661 ^ definitely 5.3669x faster >+ date-to-locale-time-string 373.1970+-3.0142 ^ 67.3790+-2.8952 ^ definitely 5.5388x faster >+ >+ >+ * JavaScriptCore.xcodeproj/project.pbxproj: >+ * Sources.txt: >+ * runtime/IntlCache.cpp: Added. >+ (JSC::IntlCache::cacheSharedPatternGenerator): >+ (JSC::IntlCache::getBestDateTimePattern): >+ * runtime/IntlCache.h: Added. >+ (JSC::IntlCache::getSharedPatternGenerator): >+ * runtime/IntlDateTimeFormat.cpp: >+ (JSC::IntlDateTimeFormat::initializeDateTimeFormat): >+ * runtime/VM.cpp: >+ (JSC::VM::VM): >+ * runtime/VM.h: >+ (JSC::VM::intlCache): >+ > 2020-09-15 HyeockJin Kim <kherootz@gmail.com> > > Check whether the iterator is callable in spread >diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >index 4f74d89956ee8422b257ece0c9b0e324c72809f2..c84206e7cafe3df8bf8a29731d90353c44da09b8 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >@@ -1797,6 +1797,7 @@ > E31618131EC5FE170006A218 /* DOMAnnotation.h in Headers */ = {isa = PBXBuildFile; fileRef = E31618101EC5FE080006A218 /* DOMAnnotation.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E31618151EC5FE270006A218 /* DOMAttributeGetterSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = E31618121EC5FE080006A218 /* DOMAttributeGetterSetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E318CBC11B8AEF5100A2929D /* JSModuleNamespaceObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E318CBBF1B8AEF5100A2929D /* JSModuleNamespaceObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ E31C31322511AFD700E7A3A0 /* IntlCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E31C31302511AFD600E7A3A0 /* IntlCache.h */; }; > E3201C1D1F8E82360076A032 /* JSScriptFetchParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = E38D060B1F8E814100649CF2 /* JSScriptFetchParameters.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E3201C1E1F8E824C0076A032 /* ScriptFetchParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = E38D060C1F8E814100649CF2 /* ScriptFetchParameters.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E322E5A31DA64439006E7709 /* DFGSnippetParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E322E5A11DA64435006E7709 /* DFGSnippetParams.h */; }; >@@ -4975,6 +4976,8 @@ > E31618121EC5FE080006A218 /* DOMAttributeGetterSetter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMAttributeGetterSetter.h; sourceTree = "<group>"; }; > E318CBBE1B8AEF5100A2929D /* JSModuleNamespaceObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSModuleNamespaceObject.cpp; sourceTree = "<group>"; }; > E318CBBF1B8AEF5100A2929D /* JSModuleNamespaceObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSModuleNamespaceObject.h; sourceTree = "<group>"; }; >+ E31C31302511AFD600E7A3A0 /* IntlCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlCache.h; sourceTree = "<group>"; }; >+ E31C31312511AFD600E7A3A0 /* IntlCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntlCache.cpp; sourceTree = "<group>"; }; > E322E5A01DA64435006E7709 /* DFGSnippetParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGSnippetParams.cpp; path = dfg/DFGSnippetParams.cpp; sourceTree = "<group>"; }; > E322E5A11DA64435006E7709 /* DFGSnippetParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGSnippetParams.h; path = dfg/DFGSnippetParams.h; sourceTree = "<group>"; }; > E322E5A41DA644A4006E7709 /* FTLSnippetParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLSnippetParams.cpp; path = ftl/FTLSnippetParams.cpp; sourceTree = "<group>"; }; >@@ -7310,6 +7313,8 @@ > A7A8AF2B17ADB5F3005AB174 /* Int8Array.h */, > BC9BB95B0E19680600DF8855 /* InternalFunction.cpp */, > BC11667A0E199C05008066DD /* InternalFunction.h */, >+ E31C31312511AFD600E7A3A0 /* IntlCache.cpp */, >+ E31C31302511AFD600E7A3A0 /* IntlCache.h */, > A1B9E2331B4E0D6700BC7FED /* IntlCollator.cpp */, > A1B9E2341B4E0D6700BC7FED /* IntlCollator.h */, > A1B9E2351B4E0D6700BC7FED /* IntlCollatorConstructor.cpp */, >@@ -9824,6 +9829,7 @@ > 53F6BF6D1C3F060A00F41E5D /* InternalFunctionAllocationProfile.h in Headers */, > 1429D77C0ED20D7300B89619 /* Interpreter.h in Headers */, > E39D45F51D39005600B3B377 /* InterpreterInlines.h in Headers */, >+ E31C31322511AFD700E7A3A0 /* IntlCache.h in Headers */, > A1B9E23A1B4E0D6700BC7FED /* IntlCollator.h in Headers */, > A1B9E23C1B4E0D6700BC7FED /* IntlCollatorConstructor.h in Headers */, > A18193E31B4E0CDB00FC1029 /* IntlCollatorConstructor.lut.h in Headers */, >diff --git a/Source/JavaScriptCore/Sources.txt b/Source/JavaScriptCore/Sources.txt >index 49a761f12aa50cf194096aa0294f8c0906a7798b..6f8e271972135551238a7b84711a1567509c3340 100644 >--- a/Source/JavaScriptCore/Sources.txt >+++ b/Source/JavaScriptCore/Sources.txt >@@ -810,6 +810,7 @@ runtime/InitializeThreading.cpp > runtime/InspectorInstrumentationObject.cpp > runtime/InternalFunction.cpp > runtime/Intrinsic.cpp >+runtime/IntlCache.cpp > runtime/IntlCollator.cpp > runtime/IntlCollatorConstructor.cpp > runtime/IntlCollatorPrototype.cpp >diff --git a/Source/JavaScriptCore/runtime/IntlCache.cpp b/Source/JavaScriptCore/runtime/IntlCache.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..2a7915ac5105626ccd2d488419d732250620c0ad >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/IntlCache.cpp >@@ -0,0 +1,54 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "IntlCache.h" >+ >+namespace JSC { >+ >+UDateTimePatternGenerator* IntlCache::cacheSharedPatternGenerator(const CString& locale, UErrorCode& status) >+{ >+ auto generator = std::unique_ptr<UDateTimePatternGenerator, ICUDeleter<udatpg_close>>(udatpg_open(locale.data(), &status)); >+ if (U_FAILURE(status)) >+ return nullptr; >+ m_cachedDateTimePatternGeneratorLocale = locale; >+ m_cachedDateTimePatternGenerator = WTFMove(generator); >+ return m_cachedDateTimePatternGenerator.get(); >+} >+ >+Vector<UChar, 32> IntlCache::getBestDateTimePattern(const CString& locale, const UChar* skeleton, unsigned skeletonSize, UErrorCode& status) >+{ >+ // Always use ICU date format generator, rather than our own pattern list and matcher. >+ auto sharedGenerator = getSharedPatternGenerator(locale, status); >+ if (U_FAILURE(status)) >+ return { }; >+ Vector<UChar, 32> patternBuffer; >+ status = callBufferProducingFunction(udatpg_getBestPatternWithOptions, sharedGenerator, skeleton, skeletonSize, UDATPG_MATCH_HOUR_FIELD_LENGTH, patternBuffer); >+ if (U_FAILURE(status)) >+ return { }; >+ return patternBuffer; >+} >+ >+} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/IntlCache.h b/Source/JavaScriptCore/runtime/IntlCache.h >new file mode 100644 >index 0000000000000000000000000000000000000000..b9672ff51a4e299539508afaacd07d2f93ccdaf9 >--- /dev/null >+++ b/Source/JavaScriptCore/runtime/IntlCache.h >@@ -0,0 +1,58 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <unicode/udatpg.h> >+#include <wtf/Noncopyable.h> >+#include <wtf/unicode/icu/ICUHelpers.h> >+ >+namespace JSC { >+ >+class IntlCache { >+ WTF_MAKE_NONCOPYABLE(IntlCache); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ IntlCache() = default; >+ >+ Vector<UChar, 32> getBestDateTimePattern(const CString& locale, const UChar* skeleton, unsigned skeletonSize, UErrorCode&); >+ >+private: >+ UDateTimePatternGenerator* getSharedPatternGenerator(const CString& locale, UErrorCode& status) >+ { >+ if (m_cachedDateTimePatternGenerator) { >+ if (locale == m_cachedDateTimePatternGeneratorLocale) >+ return m_cachedDateTimePatternGenerator.get(); >+ } >+ return cacheSharedPatternGenerator(locale, status); >+ } >+ >+ UDateTimePatternGenerator* cacheSharedPatternGenerator(const CString& locale, UErrorCode&); >+ >+ std::unique_ptr<UDateTimePatternGenerator, ICUDeleter<udatpg_close>> m_cachedDateTimePatternGenerator; >+ CString m_cachedDateTimePatternGeneratorLocale; >+}; >+ >+} // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >index 7f22a55d7a7c3b8febae3a4d0456f8a8dcc8eb62..f51cb02ee88d86c997a2332c5cc0d01b4641be1c 100644 >--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >@@ -27,12 +27,12 @@ > #include "config.h" > #include "IntlDateTimeFormat.h" > >+#include "IntlCache.h" > #include "IntlObjectInlines.h" > #include "JSBoundFunction.h" > #include "JSCInlines.h" > #include "ObjectConstructor.h" > #include <unicode/ucal.h> >-#include <unicode/udatpg.h> > #include <unicode/uenum.h> > #include <wtf/text/StringBuilder.h> > #include <wtf/unicode/icu/ICUHelpers.h> >@@ -814,18 +814,6 @@ void IntlDateTimeFormat::initializeDateTimeFormat(JSGlobalObject* globalObject, > m_timeStyle = intlOption<DateTimeStyle>(globalObject, options, vm.propertyNames->timeStyle, { { "full"_s, DateTimeStyle::Full }, { "long"_s, DateTimeStyle::Long }, { "medium"_s, DateTimeStyle::Medium }, { "short"_s, DateTimeStyle::Short } }, "timeStyle must be \"full\", \"long\", \"medium\", or \"short\""_s, DateTimeStyle::None); > RETURN_IF_EXCEPTION(scope, void()); > >- >- auto patternFromSkeleton = [&](const UChar* skeleton, unsigned skeletonSize, Vector<UChar, 32>& patternBuffer, UErrorCode& status) { >- // Always use ICU date format generator, rather than our own pattern list and matcher. >- auto generator = std::unique_ptr<UDateTimePatternGenerator, ICUDeleter<udatpg_close>>(udatpg_open(dataLocaleWithExtensions.data(), &status)); >- if (U_FAILURE(status)) >- return; >- >- status = callBufferProducingFunction(udatpg_getBestPatternWithOptions, generator.get(), skeleton, skeletonSize, UDATPG_MATCH_HOUR_FIELD_LENGTH, patternBuffer); >- if (U_FAILURE(status)) >- return; >- }; >- > Vector<UChar, 32> patternBuffer; > if (m_dateStyle != DateTimeStyle::None || m_timeStyle != DateTimeStyle::None) { > // 30. For each row in Table 1, except the header row, do >@@ -902,8 +890,7 @@ void IntlDateTimeFormat::initializeDateTimeFormat(JSGlobalObject* globalObject, > replaceHourCycleInSkeleton(skeleton, specifiedHour12); > dataLogLnIf(IntlDateTimeFormatInternal::verbose, "replaced:(", StringView(skeleton.data(), skeleton.size()), ")"); > >- patternBuffer.clear(); >- patternFromSkeleton(skeleton.data(), skeleton.size(), patternBuffer, status); >+ patternBuffer = vm.intlCache().getBestDateTimePattern(dataLocaleWithExtensions, skeleton.data(), skeleton.size(), status); > if (U_FAILURE(status)) { > throwTypeError(globalObject, scope, "failed to initialize DateTimeFormat"_s); > return; >@@ -913,7 +900,7 @@ void IntlDateTimeFormat::initializeDateTimeFormat(JSGlobalObject* globalObject, > } else { > UErrorCode status = U_ZERO_ERROR; > String skeleton = skeletonBuilder.toString(); >- patternFromSkeleton(StringView(skeleton).upconvertedCharacters().get(), skeleton.length(), patternBuffer, status); >+ patternBuffer = vm.intlCache().getBestDateTimePattern(dataLocaleWithExtensions, StringView(skeleton).upconvertedCharacters().get(), skeleton.length(), status); > if (U_FAILURE(status)) { > throwTypeError(globalObject, scope, "failed to initialize DateTimeFormat"_s); > return; >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index 59e40c8e4cc987ef43ce71afdedf0e1a1ce1e5f1..98776fc8ce5ded6fc8adf10c34a5d92e58d1b7ed 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -65,6 +65,7 @@ > #include "HeapProfiler.h" > #include "HostCallReturnValue.h" > #include "Interpreter.h" >+#include "IntlCache.h" > #include "IntlCollator.h" > #include "IntlDateTimeFormat.h" > #include "IntlDisplayNames.h" >@@ -398,6 +399,7 @@ VM::VM(VMType vmType, HeapType heapType, WTF::RunLoop* runLoop, bool* success) > #endif > , m_stackPointerAtVMEntry(nullptr) > , m_codeCache(makeUnique<CodeCache>()) >+ , m_intlCache(makeUnique<IntlCache>()) > , m_builtinExecutables(makeUnique<BuiltinExecutables>(*this)) > , m_typeProfilerEnabledCount(0) > , m_primitiveGigacageEnabled(IsWatched) >diff --git a/Source/JavaScriptCore/runtime/VM.h b/Source/JavaScriptCore/runtime/VM.h >index 0f3821fb1274f844b8f70342ae1b27681f362939..d38afa2bb7bbf5facf1f112fdece25a9238d8cb9 100644 >--- a/Source/JavaScriptCore/runtime/VM.h >+++ b/Source/JavaScriptCore/runtime/VM.h >@@ -124,6 +124,7 @@ class HasOwnPropertyCache; > class HeapProfiler; > class Identifier; > class Interpreter; >+class IntlCache; > class IntlCollator; > class IntlDateTimeFormat; > class IntlDisplayNames; >@@ -1022,6 +1023,7 @@ class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> { > > JSLock& apiLock() { return *m_apiLock; } > CodeCache* codeCache() { return m_codeCache.get(); } >+ IntlCache& intlCache() { return *m_intlCache; } > > JS_EXPORT_PRIVATE void whenIdle(Function<void()>&&); > >@@ -1208,6 +1210,7 @@ class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> { > bool m_globalConstRedeclarationShouldThrow { true }; > bool m_shouldBuildPCToCodeOriginMapping { false }; > std::unique_ptr<CodeCache> m_codeCache; >+ std::unique_ptr<IntlCache> m_intlCache; > std::unique_ptr<BuiltinExecutables> m_builtinExecutables; > HashMap<RefPtr<UniquedStringImpl>, RefPtr<WatchpointSet>> m_impurePropertyWatchpointSets; > std::unique_ptr<TypeProfiler> m_typeProfiler; >diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index 49995cc911ec84e8ecc5aca8e224566cc6aaecaa..2130f9708967aef9d8cb4fb4080929051e00b429 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,14 @@ >+2020-09-15 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ [JSC] Cache UDateTimePatternGenerator >+ https://bugs.webkit.org/show_bug.cgi?id=213454 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * microbenchmarks/date-to-locale-date-string.js: Added. >+ * microbenchmarks/date-to-locale-string.js: Added. >+ * microbenchmarks/date-to-locale-time-string.js: Added. >+ > 2020-09-15 HyeockJin Kim <kherootz@gmail.com> > > Check whether the iterator is callable in spread >diff --git a/JSTests/microbenchmarks/date-to-locale-date-string.js b/JSTests/microbenchmarks/date-to-locale-date-string.js >new file mode 100644 >index 0000000000000000000000000000000000000000..214404f6e4028bb4dccf689dd8b672252f5fbca2 >--- /dev/null >+++ b/JSTests/microbenchmarks/date-to-locale-date-string.js >@@ -0,0 +1,2 @@ >+for (var i = 0; i < 1e3; ++i) >+ new Date().toLocaleDateString(); >diff --git a/JSTests/microbenchmarks/date-to-locale-string.js b/JSTests/microbenchmarks/date-to-locale-string.js >new file mode 100644 >index 0000000000000000000000000000000000000000..948f943f9c2339af752ede5c7a7e17e429b18d22 >--- /dev/null >+++ b/JSTests/microbenchmarks/date-to-locale-string.js >@@ -0,0 +1,2 @@ >+for (var i = 0; i < 1e3; ++i) >+ new Date().toLocaleString(); >diff --git a/JSTests/microbenchmarks/date-to-locale-time-string.js b/JSTests/microbenchmarks/date-to-locale-time-string.js >new file mode 100644 >index 0000000000000000000000000000000000000000..b5fe97e427a71140c410479240da06a8d6394f38 >--- /dev/null >+++ b/JSTests/microbenchmarks/date-to-locale-time-string.js >@@ -0,0 +1,2 @@ >+for (var i = 0; i < 1e3; ++i) >+ new Date().toLocaleTimeString();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ross.kirsling
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 213454
: 408891