[webkit-changes] [WebKit/WebKit] a586f8: [JSC] Add fast path for TypedArray::setArrayLike
Yusuke Suzuki
noreply at github.com
Tue Jun 20 23:01:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a586f85207e80977e49deccbdb80f09cd1930f7c
https://github.com/WebKit/WebKit/commit/a586f85207e80977e49deccbdb80f09cd1930f7c
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-06-20 (Tue, 20 Jun 2023)
Changed paths:
A JSTests/microbenchmarks/typed-array-new-from-double-array.js
A JSTests/microbenchmarks/typed-array-new-from-int32-array.js
M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h
Log Message:
-----------
[JSC] Add fast path for TypedArray::setArrayLike
https://bugs.webkit.org/show_bug.cgi?id=258337
rdar://111080722
Reviewed by Alexey Shvayka.
We should make `new TypedArray([0, 1, 2, 3, ...])` faster. This patch adds a fast path converting Int32 / Double arrays to TypedArray.
ToT Patched
typed-array-new-from-double-array 61.5644+-0.2921 ^ 14.6969+-0.2090 ^ definitely 4.1889x faster
typed-array-new-from-int32-array 54.1675+-0.2508 ^ 15.0343+-0.2724 ^ definitely 3.6029x faster
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::setFromArrayLike):
Canonical link: https://commits.webkit.org/265346@main
More information about the webkit-changes
mailing list