Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 326fe132d52717c19ec93ecdefaa1105065498c8
      
https://github.com/WebKit/WebKit/commit/326fe132d52717c19ec93ecdefaa1105065498c8
  Author: Sosuke Suzuki <sos...@bun.sh>
  Date:   2025-09-11 (Thu, 11 Sep 2025)

  Changed paths:
    A JSTests/stress/set-prototype-difference-empty-sets.js
    A JSTests/stress/set-prototype-difference-large-sets.js
    A JSTests/stress/set-prototype-difference-optimized.js
    A JSTests/stress/set-prototype-difference-property-access-order.js
    A JSTests/stress/set-prototype-difference-special-values.js
    M Source/JavaScriptCore/builtins/SetPrototype.js
    M Source/JavaScriptCore/runtime/SetPrototype.cpp

  Log Message:
  -----------
  [JSC] Implement `Set.prototype.difference` in C++
https://bugs.webkit.org/show_bug.cgi?id=298696

Reviewed by Yusuke Suzuki.

This patch changes to implement `Set.prototype.difference` in C++.

                        TipOfTree                  Patched

set-difference       21.0741+-0.5328     ^     14.7943+-0.6722        ^ 
definitely 1.4245x faster

* JSTests/stress/set-prototype-difference-empty-sets.js: Added.
(shouldBe):
* JSTests/stress/set-prototype-difference-large-sets.js: Added.
(shouldBe):
(set let):
(let.perfSetLike.has):
(let.perfSetLike.return.next):
(let.perfSetLike.keys):
(let.overlappingPerfSetLike.has):
(let.overlappingPerfSetLike.return.next):
(let.overlappingPerfSetLike.keys):
* JSTests/stress/set-prototype-difference-optimized.js: Added.
(shouldBe):
(set let):
(let.largeSetLike.has):
(let.largeSetLike.return.next):
(let.largeSetLike.keys):
(let.smallSetLike.has):
(let.smallSetLike.return.next):
(let.smallSetLike.keys):
(let.modSetLike.has):
(let.modSetLike.return.next):
(let.modSetLike.keys):
(let.trackedSetLike.get size):
(let.trackedSetLike.get has):
(let.trackedSetLike.get keys.return.next):
(let.trackedSetLike.get keys):
* JSTests/stress/set-prototype-difference-property-access-order.js: Added.
(shouldBe):
(main.let.obj.get size):
(main.let.obj.get has):
(main.let.obj.get keys.return.next):
(main.let.obj.get keys):
(main.let.set new):
(testSmallSetOptimization.let.obj.get size):
(testSmallSetOptimization.let.obj.get has):
(testSmallSetOptimization.let.obj.get keys.return.next):
(testSmallSetOptimization.let.obj.get keys):
(testSmallSetOptimization):
(testLargeSetOptimization.let.obj.get size):
(testLargeSetOptimization.let.obj.get has):
(testLargeSetOptimization.let.obj.get keys.return.next):
(testLargeSetOptimization.let.obj.get keys):
(testLargeSetOptimization):
* JSTests/stress/set-prototype-difference-special-values.js: Added.
(shouldBe):
(let.disjointSetLike.has):
(let.disjointSetLike.return.next):
(let.disjointSetLike.keys):
(let.set new):
(let.overlappingSetLike.has):
(let.overlappingSetLike.return.next):
(let.overlappingSetLike.keys):
(let.result.set difference):
(let.disjointSymbolSetLike.has):
(let.disjointSymbolSetLike.return.next):
(let.disjointSymbolSetLike.keys):
(result.set difference):
(let.overlappingSymbolSetLike.has):
(let.overlappingSymbolSetLike.return.next):
(let.overlappingSymbolSetLike.keys):
(let.disjointObjectSetLike.has):
(let.disjointObjectSetLike.return.next):
(let.disjointObjectSetLike.keys):
(let.overlappingObjectSetLike.has):
(let.overlappingObjectSetLike.return.next):
(let.overlappingObjectSetLike.keys):
* Source/JavaScriptCore/builtins/SetPrototype.js:
(difference.else.wrapper.iterator): Deleted.
(difference): Deleted.
* Source/JavaScriptCore/runtime/SetPrototype.cpp:
(JSC::SetPrototype::finishCreation):
(JSC::fastSetDifference):
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/299885@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to