Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add initial benchmark #22

Merged
merged 1 commit into from
Jul 22, 2023
Merged

feat: add initial benchmark #22

merged 1 commit into from
Jul 22, 2023

Conversation

anonrig
Copy link
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
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.

benchmark/add.sh Outdated Show resolved Hide resolved
@anonrig
Copy link
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
Member

zkochan commented Jul 21, 2023

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

@anonrig
Copy link
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
12 checks passed
@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