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: |

SUCK Channel Telegram The best encrypted messaging apps 2How to set up a Telegram channel? (A step-by-step tutorial) How to create a business channel on Telegram? (Tutorial) Other crimes that the SUCK Channel incited under Ng’s watch included using corrosive chemicals to make explosives and causing grievous bodily harm with intent. The court also found Ng responsible for calling on people to assist protesters who clashed violently with police at several universities in November 2019.
from us


Telegram JavaScript Daily
FROM American