v8/test/js-perf-test/ArraySort/sort.js
Simon Zünd 5874911bc7 Extend Array.p.sort benchmarks.
This adds benchmarks that sort all element kinds with multiple comparison
functions. This also adds benchmarks that cause the element kind of
the array to change after x amount of comparisons.
The last set of benchmarks that are added, measure performance on
pre-sorted arrays.

R=jgruber@chromium.org, petermarshall@chromium.org

Bug: v8:7382
Change-Id: I620de37f4a28f8096682bb708ea4f7a9a21d5316
Reviewed-on: https://chromium-review.googlesource.com/1009602
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52574}
2018-04-12 14:11:34 +00:00

16 lines
558 B
JavaScript

// Copyright 2018 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.
load('sort-base.js');
benchy('PackedSmi', Sort, CreatePackedSmiArray);
benchy('PackedDouble', Sort, CreatePackedDoubleArray);
benchy('PackedElement', Sort, CreatePackedObjectArray);
benchy('HoleySmi', Sort, CreateHoleySmiArray);
benchy('HoleyDouble', Sort, CreateHoleyDoubleArray);
benchy('HoleyElement', Sort, CreateHoleyObjectArray);
benchy('Dictionary', Sort, CreateDictionaryArray);