JAVASCRIPTDAILY Telegram 336
Bun vs pnpm

I'm seeing a lot of bun vs pnpm install speed comparisons but would like to provide some nuance: the absurd perf difference usually is a result of one tool running with a network API call overhead, while the other not.

bun install defaults to the behavior similar to pnpm's --prefer-offline flag, which skips hitting the npm API. To simulate the default behavior of pnpm, you have to use bun --force.

Here are some comparisons on my machine (network from Singapore) with different conditions:

bun (no cache, no lockfile): 5.4s
pnpm (no cache, no lockfile): 6.7s

bun (with cache, no lockfile): 30ms
pnpm (--prefer-offline, with cache, no lockfile): 587ms

bun (--force, with cache, no lockfile): 2.73s
pnpm (with cache, no lockfile): 5.9s

bun is still faster, but not so significant as some benchmark graphs may have led you to believe.

bun itself is amazing in many ways and deserve hype, but I'd love to see we compare apples to apples and not gloss over the details for engagement.

context for the benchmark: it's using the Vite + Vue + TypeScript boilerplate generated from bun create vite.

- Evan You (https://twitter.com/youyuxi/status/1701243745880932687)


🔥 Follow @javascriptdaily 🔥
👍10🔥6👏32



tgoop.com/javascriptdaily/336
Create:
Last Update:

Bun vs pnpm

I'm seeing a lot of bun vs pnpm install speed comparisons but would like to provide some nuance: the absurd perf difference usually is a result of one tool running with a network API call overhead, while the other not.

bun install defaults to the behavior similar to pnpm's --prefer-offline flag, which skips hitting the npm API. To simulate the default behavior of pnpm, you have to use bun --force.

Here are some comparisons on my machine (network from Singapore) with different conditions:

bun (no cache, no lockfile): 5.4s
pnpm (no cache, no lockfile): 6.7s

bun (with cache, no lockfile): 30ms
pnpm (--prefer-offline, with cache, no lockfile): 587ms

bun (--force, with cache, no lockfile): 2.73s
pnpm (with cache, no lockfile): 5.9s

bun is still faster, but not so significant as some benchmark graphs may have led you to believe.

bun itself is amazing in many ways and deserve hype, but I'd love to see we compare apples to apples and not gloss over the details for engagement.

context for the benchmark: it's using the Vite + Vue + TypeScript boilerplate generated from bun create vite.

- Evan You (https://twitter.com/youyuxi/status/1701243745880932687)


🔥 Follow @javascriptdaily 🔥

BY JavaScript Daily


Share with your friend now:
tgoop.com/javascriptdaily/336

View MORE
Open in Telegram


Telegram News

Date: |

Telegram desktop app: In the upper left corner, click the Menu icon (the one with three lines). Select “New Channel” from the drop-down menu. Private channels are only accessible to subscribers and don’t appear in public searches. To join a private channel, you need to receive a link from the owner (administrator). A private channel is an excellent solution for companies and teams. You can also use this type of channel to write down personal notes, reflections, etc. By the way, you can make your private channel public at any moment. While some crypto traders move toward screaming as a coping mechanism, many mental health experts have argued that “scream therapy” is pseudoscience. Scientific research or no, it obviously feels good. “Hey degen, are you stressed? Just let it all out,” he wrote, along with a link to join the group. How to create a business channel on Telegram? (Tutorial)
from us


Telegram JavaScript Daily
FROM American