Skip to content

Commit

Permalink
add all values benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
richytong committed Dec 15, 2024
1 parent 05a0825 commit 664553e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions benchmarks/all.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ const all = require('../all')

const suite = new TimeInLoopSuite({ async: true, loopCount: 1e5 })

suite.add('rubico async array all promises', async () => {
await all([
Promise.resolve(1),
Promise.resolve(2),
Promise.resolve(3),
])
})

suite.add('rubico async object all promises', async () => {
await all({
a: Promise.resolve(1),
b: Promise.resolve(2),
c: Promise.resolve(3),
})
})

suite.add('rubico async array all', async () => {
await all(5, [
async value => value + 1,
Expand Down

0 comments on commit 664553e

Please sign in to comment.