diff options
Diffstat (limited to 'deps/v8/test/js-perf-test/TypedArrays/base.js')
-rw-r--r-- | deps/v8/test/js-perf-test/TypedArrays/base.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/deps/v8/test/js-perf-test/TypedArrays/base.js b/deps/v8/test/js-perf-test/TypedArrays/base.js new file mode 100644 index 0000000000..04f65a6ea6 --- /dev/null +++ b/deps/v8/test/js-perf-test/TypedArrays/base.js @@ -0,0 +1,26 @@ +// 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. + +const typedArrayIntConstructors = [ + {name: "Uint8", ctor: Uint8Array}, + {name: "Int8", ctor: Int8Array}, + {name: "Uint16", ctor: Uint16Array}, + {name: "Int16", ctor: Int16Array}, + {name: "Uint32", ctor: Uint32Array}, + {name: "Int32", ctor: Int32Array}, + {name: "Uint8Clamped", ctor: Uint8ClampedArray}, +]; + +const typedArrayFloatConstructors = [ + {name: "Float32", ctor: Float32Array}, + {name: "Float64", ctor: Float64Array}, +]; + +// "ref" builds might not yet have BigInt support, so the benchmark fails +// gracefully during setup (the constructor will be undefined), instead of +// a hard fail when this file is loaded. +const typedArrayBigIntConstructors = [ + {name: "BigUint64", ctor: this["BigUint64Array"]}, + {name: "BigInt64", ctor: this["BigInt64Array"]} +]; |