Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 38df8fb7a13a27c7305fb927e6d7094b12f22ef2
https://github.com/WebKit/WebKit/commit/38df8fb7a13a27c7305fb927e6d7094b12f22ef2
Author: Sosuke Suzuki <[email protected]>
Date: 2025-09-09 (Tue, 09 Sep 2025)
Changed paths:
A JSTests/microbenchmarks/iterator-prototype-forEach-map.js
A JSTests/microbenchmarks/iterator-prototype-toArray-map.js
A JSTests/stress/aggregate-error-constructor-broken-map.js
A JSTests/stress/iterator-prototype-forEach-map.js
A JSTests/stress/iterator-prototype-toArray-broken-map-iterator.js
A JSTests/stress/iterator-prototype-toArray-map.js
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/runtime/IteratorOperations.h
M Source/JavaScriptCore/runtime/JSMap.cpp
M Source/JavaScriptCore/runtime/JSMap.h
M Source/JavaScriptCore/runtime/JSMapInlines.h
M Source/JavaScriptCore/runtime/MapIteratorPrototype.h
M Source/JavaScriptCore/runtime/MapIteratorPrototypeInlines.h
Log Message:
-----------
[JSC] Add fast path for iteration on Map
https://bugs.webkit.org/show_bug.cgi?id=298171
Reviewed by Keith Miller.
This patch changes to apply the same optimization as
commits.webkit.org/299358@main
to Map.
TipOfTree Patched
iterator-prototype-forEach-map 4.6865+-0.1369 ^ 0.9110+-0.0499
^ definitely 5.1442x faster
* JSTests/microbenchmarks/iterator-prototype-forEach-map.js: Added.
(test):
* JSTests/microbenchmarks/iterator-prototype-toArray-map.js: Added.
(test):
* JSTests/stress/aggregate-error-constructor-broken-map.js: Added.
(shouldBe):
(shouldThrow):
(throw.new.Error):
(shouldBe.map.Symbol.iterator):
(mapIterator.next):
(new.AggregateError):
* JSTests/stress/iterator-prototype-forEach-map.js: Added.
(test):
(shouldBe):
(throw.new.Error):
(shouldBe.Map.prototype.Symbol.iterator):
* JSTests/stress/iterator-prototype-toArray-broken-map-iterator.js: Added.
(test):
(shouldBe):
(shouldThrow):
(throw.new.Error.mapIterator.next):
(throw.new.Error):
(newProto.next):
* JSTests/stress/iterator-prototype-toArray-map.js: Added.
(test):
(shouldBe):
(throw.new.Error):
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/runtime/IteratorOperations.h:
(JSC::forEachInMapStorage):
(JSC::forEachInIterable):
(JSC::forEachInIteratorProtocol):
* Source/JavaScriptCore/runtime/JSMap.cpp:
(JSC::JSMap::isIteratorProtocolFastAndNonObservable): Deleted.
* Source/JavaScriptCore/runtime/JSMap.h:
* Source/JavaScriptCore/runtime/JSMapInlines.h:
(JSC::JSMap::isIteratorProtocolFastAndNonObservable):
* Source/JavaScriptCore/runtime/MapIteratorPrototype.h:
* Source/JavaScriptCore/runtime/MapIteratorPrototypeInlines.h:
(JSC::mapIteratorProtocolIsFastAndNonObservable):
Canonical link: https://commits.webkit.org/299751@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes