diff --git a/.github/workflows/run_all.yml b/.github/workflows/run_all.yml index 0f42a63b..64d109ae 100644 --- a/.github/workflows/run_all.yml +++ b/.github/workflows/run_all.yml @@ -8,7 +8,7 @@ on: node-versions: required: true type: string - default: '["18.0.0","18.20.2","18.20.3","20.0.0","20.13.1","20.14.0","21.0.0","21.7.2","21.7.3","22.0.0","22.1.0","22.2.0"]' + default: '["18.0.0","18.20.3","18.20.4","20.0.0","20.15.0","20.15.1","21.0.0","21.7.2","21.7.3","22.0.0","22.4.0","22.4.1"]' description: 'The Node.js Versions (should be a JSON array)' permissions: @@ -170,8 +170,17 @@ jobs: node-versions: ${{ inputs.node-versions }} run-start-stop: false - object-creation: + math-floor-vs-tilde: needs: last-array-item + name: Running "math-floor-vs-tilde.mjs" + uses: ./.github/workflows/bench.yml + with: + bench-file: math-floor-vs-tilde.mjs + node-versions: ${{ inputs.node-versions }} + run-start-stop: false + + object-creation: + needs: math-floor-vs-tilde name: Running "object-creation.mjs" uses: ./.github/workflows/bench.yml with: diff --git a/bench/math-floor-vs-tilde.mjs b/bench/math-floor-vs-tilde.mjs new file mode 100644 index 00000000..672b4f4f --- /dev/null +++ b/bench/math-floor-vs-tilde.mjs @@ -0,0 +1,19 @@ +import { createBenchmarkSuite } from '../common.mjs' + +const suite = createBenchmarkSuite('Math.floor vs ~') + +suite + .add('Math.floor (small)', function () { + return Math.floor(15.95) + }) + .add('~ (small)', function () { + return ~15.95 + }) + .add('Math.floor (long)', function () { + return Math.floor(15.95231232132132) + }) + .add('~ (long)', function () { + return ~15.95231232132132 + }) + +await suite.runAndPrintResults()