1 import { bench, group, run } from 'tatami-ng'
3 import { generateRandomNumberArray } from './benchmark-utils.mjs'
6 let testArray = generateRandomNumberArray(size)
8 group(`Empty array with ${size} elements`, () => {
9 bench('length = 0', () => {
12 bench('pop loop', () => {
13 while (testArray.length > 0) {
17 bench('splice', () => {
18 testArray.splice(0, testArray.length)
20 bench('shift loop', () => {
21 while (testArray.length > 0) {
25 bench('initialize', () => {