Open ayushk7 opened 10 months ago
At the time it was created, bun didn’t run the install scripts
When I decided to check the '25x faster' claim and ran the benchmark command on my PC, the winner was pmpm, which left me confused. With --ignore-scripts option, the winner was bun, but it was only 4.5x faster than npm. '25x faster' is a very bold claim.
bun install --backend=hardlink --ignore-scripts ran
1.11 ± 0.05 times faster than pnpm install --ignore-scripts
4.40 ± 0.22 times faster than npm install --no-scripts --ignore-scripts
4.85 ± 0.46 times faster than yarn install --no-scripts
Anyway, --no-scripts is rarely used in real life. With simply install
command the results is even worse:
$ hyperfine "bun install" "yarn install" "npm install" "pnpm install" --prepare "rm -rf node_modules" --warmup=1 --runs 3
pnpm install ran
1.50 ± 0.04 times faster than bun install
3.64 ± 0.51 times faster than yarn install
4.04 ± 0.18 times faster than npm install
I'm still confused.
What is the type of issue?
Documentation is incorrect, Documentation is confusing
What is the issue?
The benchmark image shown doesn't have the
--ignore-scripts
flag for thebun install
, where as for other package managers it is there.I was following the same command, and found out the
bun install --backend=hardlink
was slower thanpnpm install --ignore-scripts
by a factor of 20 because bun was also doing the postinstall for some package. And when I added the flag (bun install --backend=hardlink --ignore-scripts
) bun was indeed faster.Where did you find it?
https://bun.sh/docs/cli/install#:~:text=%E2%9A%A1%EF%B8%8F-,25x%20faster,-%E2%80%94%20Switch%20from%20npm