Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b3adba53257656b5383d7f511f0398d2b1e24a93
https://github.com/WebKit/WebKit/commit/b3adba53257656b5383d7f511f0398d2b1e24a93
Author: Sosuke Suzuki <[email protected]>
Date: 2025-04-05 (Sat, 05 Apr 2025)
Changed paths:
M JSTests/microbenchmarks/array-prototype-includes-int32.js
A JSTests/microbenchmarks/array-prototype-indexOf-int32.js
M Source/JavaScriptCore/runtime/ArrayPrototype.cpp
M Source/JavaScriptCore/runtime/JSArray.cpp
Log Message:
-----------
[JSC] Use `WTF::find64` for searching int32 from array by `indexOf` /
`includes` in runtime
https://bugs.webkit.org/show_bug.cgi?id=291135
Reviewed by Yusuke Suzuki.
This patch changes to use `WTF::find64` instead of for loop for
searching int32 from array by `Array#indexOf` / `Array#includes`
in runtime (not JIT) using the same approach as
https://commits.webkit.org/292999@main .
However, this change showed little performance improvement in
micro-benchmarks. Therefore, this patch is more of a refactoring
aimed at improving code consistency than an optimization:
TipOfTree
Patched
array-prototype-includes-int32 122.1570+-1.0730
120.8459+-1.6853 might be 1.0108x faster
array-prototype-indexOf-int32 122.0494+-1.2063 ^
119.8085+-0.6945 ^ definitely 1.0187x faster
* JSTests/microbenchmarks/array-prototype-includes-int32.js:
* JSTests/microbenchmarks/array-prototype-indexOf-int32.js: Copied from
JSTests/microbenchmarks/array-prototype-includes-int32.js.
(test):
* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::fastIndexOf):
* Source/JavaScriptCore/runtime/JSArray.cpp:
(JSC::JSArray::fastIncludes):
Canonical link: https://commits.webkit.org/293320@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