Skip to content

feat: add initial benchmark#22

Merged
anonrig merged 1 commit intomainfrom
add-benchmarks
Jul 22, 2023
Merged

feat: add initial benchmark#22
anonrig merged 1 commit intomainfrom
add-benchmarks

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented Jul 21, 2023

An initial pretty simplistic benchmark that uses verdaccio (to remove the overhead of http requests to npm registry).

Benchmark 1: pacquet
  Time (mean ± σ):     364.6 ms ±  21.1 ms    [User: 44.0 ms, System: 173.1 ms]
  Range (min … max):   337.3 ms … 406.7 ms    10 runs

Benchmark 2: pnpm
  Time (mean ± σ):     945.9 ms ±  43.4 ms    [User: 585.6 ms, System: 1491.7 ms]
  Range (min … max):   876.5 ms … 1003.7 ms    10 runs

Benchmark 3: yarn
  Time (mean ± σ):     610.5 ms ±   7.5 ms    [User: 1250.2 ms, System: 181.2 ms]
  Range (min … max):   601.8 ms … 624.2 ms    10 runs

Benchmark 4: bun
  Time (mean ± σ):      1.055 s ±  0.222 s    [User: 0.079 s, System: 0.306 s]
  Range (min … max):    0.733 s …  1.550 s    10 runs

Summary
  pacquet ran
    1.67 ± 0.10 times faster than yarn
    2.59 ± 0.19 times faster than pnpm
    2.89 ± 0.63 times faster than bun

Copy link
Copy Markdown
Member

@zkochan zkochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm might install more stuff as it automatically installs missing peer dependencies by default.

Comment thread benchmark/add.sh Outdated
@anonrig
Copy link
Copy Markdown
Member Author

anonrig commented Jul 21, 2023

pnpm might install more stuff as it automatically installs missing peer dependencies by default.

How can I disable it?

@zkochan
Copy link
Copy Markdown
Member

zkochan commented Jul 21, 2023

You can add auto-install-peers=false to .npmrc

@anonrig
Copy link
Copy Markdown
Member Author

anonrig commented Jul 21, 2023

@zkochan I've updated the benchmarks and the results. Thank you for the review.

@anonrig anonrig merged commit e205d31 into main Jul 22, 2023
@anonrig anonrig deleted the add-benchmarks branch July 22, 2023 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants