Commit 1c9b1635 authored by Franziska Hinkelmann's avatar Franziska Hinkelmann Committed by Commit Bot

Add benchmark for TypedArray.prototype.set from array-like

Add benchmark for TypedArray.prototype.set from
a regular array.

Bug: v8:6704
Change-Id: I350960dec530c06e7cad62eec1f977d8fda97347
Reviewed-on: https://chromium-review.googlesource.com/613163Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47345}
parent 22611e8e
......@@ -331,6 +331,12 @@
"resources": ["construct-all-typedarrays.js"],
"test_flags": ["construct-all-typedarrays"]
},
{
"name": "SetFromArrayLike",
"main": "run.js",
"resources": ["set-from-arraylike.js"],
"test_flags": ["set-from-arraylike"]
},
{
"name": "SetFromDifferentType",
"main": "run.js",
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
new BenchmarkSuite('SetFromArrayLike', [1000], [
new Benchmark('SetFromArrayLike', false, false, 0, SetFromArrayLike),
]);
let src = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4];
let typed_dest = new Float32Array(16);
function SetFromArrayLike() {
typed_dest.set(src);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment