X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=is-undefined.mjs;h=933f6a24acf7c06e054394ad17593d487da853b2;hb=9dc26f074ca1efe20fc8e86a2ca5b673e8531073;hp=b720507111561c7b5337ca88aec132c5c692ee9f;hpb=4aa2893a787119ef9b3957e82539fee4fad4f98f;p=benchmarks-js.git diff --git a/is-undefined.mjs b/is-undefined.mjs index b720507..933f6a2 100644 --- a/is-undefined.mjs +++ b/is-undefined.mjs @@ -1,28 +1,14 @@ -import Benchmark from 'benny' +import { bench, group, run } from 'tatami-ng' -Benchmark.suite( - 'Is undefined', - Benchmark.add('=== undefined', (value = undefined) => { +group('Is undefined', () => { + bench('=== undefined', (value = undefined) => { return value === undefined - }), - Benchmark.add("typeof === 'undefined'", (value = undefined) => { + }) + bench("typeof === 'undefined'", (value = undefined) => { return typeof value === 'undefined' - }), - Benchmark.cycle(), - Benchmark.complete(), - Benchmark.save({ - file: 'is-undefined', - format: 'json', - details: true - }), - Benchmark.save({ - file: 'is-undefined', - format: 'chart.html', - details: true - }), - Benchmark.save({ - file: 'is-undefined', - format: 'table.html', - details: true }) -).catch(console.error) +}) + +await run({ + units: true, +})