<commit_before>import bench from 'parkbench';
import _ from 'lodash';
import {reverse} from '../../lib/array/reverse';

const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

bench()
  .add('reverse()', () => {
    reverse(arr);
  })
  .add('_.reverse()', () => {
    _.reverse(arr.slice());
  })
  .add('Array#reverse()', () => {
    arr.slice().reverse();<commit_msg>Make `reverse()` benchmark slightly more fair<commit_after>import bench from 'parkbench';
import _ from 'lodash';
import {reverse} from '../../lib/array/reverse';

const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

bench()
  .add('reverse()', () => {
    reverse(arr);
  })
  .add('_.reverse()', () => {
    _.reverse(arr);
  })
  .add('Array#reverse()', () => {
    arr.reverse();
{'fraction_non_alphanumeric': 0.25815217391304346, 'fraction_numerical': 0.029891304347826088, 'mean_word_length': 3.386904761904762, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4854806', 'n_tokens_mistral': 290, 'n_tokens_neox': 267, 'n_words': 64}