2018-04-12 10:41:39 +00:00
|
|
|
// 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');
|
|
|
|
|
|
|
|
// Each benchmark calls sort with multiple different comparison functions
|
|
|
|
// to create polyomorphic call sites. Most/all of the
|
|
|
|
// other sort benchmarks have monomorphic call sites.
|
|
|
|
let sortfn = CreateSortFn([cmp_smaller, cmp_greater]);
|
|
|
|
|
2018-06-19 05:55:22 +00:00
|
|
|
createSortSuite('PackedSmi', 1000, sortfn, CreatePackedSmiArray);
|
|
|
|
createSortSuite('PackedDouble', 1000, sortfn, CreatePackedDoubleArray);
|
|
|
|
createSortSuite('PackedElement', 1000, sortfn, CreatePackedObjectArray);
|
2018-04-12 10:41:39 +00:00
|
|
|
|
2018-06-19 05:55:22 +00:00
|
|
|
createSortSuite('HoleySmi', 1000, sortfn, CreateHoleySmiArray);
|
|
|
|
createSortSuite('HoleyDouble', 1000, sortfn, CreateHoleyDoubleArray);
|
|
|
|
createSortSuite('HoleyElement', 1000, sortfn, CreateHoleyObjectArray);
|
2018-04-12 10:41:39 +00:00
|
|
|
|
2018-06-19 05:55:22 +00:00
|
|
|
createSortSuite('Dictionary', 1000, sortfn, CreateDictionaryArray);
|