top | item 46124545

(no title)

kylecarbs | 2 months ago

Bun has completely changed my outlook on the JS ecosystem. Prior to Bun, there was little focus on performance. Now the entire space rallies around it.

Congrats to Jarred and the team!

discuss

order

krig|2 months ago

> Prior to Bun, there was little focus on performance.

This is just completely insane. We went through more than a decade of performance competition in the JS VM space, and the _only_ justification that Google had for creating V8 was performance.

> The V8 engine was first introduced by Google in 2008, coinciding with the launch of the Google Chrome web browser. At the time, web applications were becoming increasingly complex, and there was a growing need for a faster, more efficient JavaScript engine. Google recognized this need and set out to create an engine that could significantly improve JavaScript performance.

I guess this is the time we live in. Vibe-coded projects get bought by vibe-coded companies and are congratulated in vibe-coded comments.

tibbar|2 months ago

This missed the mark - Bun optimized systems whose predecessors were often implemented as JS libraries with a high number of syscalls. V8 is super fast for web usecases but your typical webpack / react compiler as implemented in JS had tons of unnecessary bottlenecks.

logsr|2 months ago

> Vibe-coded projects get bought by vibe-coded companies

this is so far from the truth. Bun, Zig, and uWebsockets are passion projects run by individuals with deep systems programming expertise. furthest thing from vibe coding imaginable.

> a decade of performance competition in the JS VM space

this was a rising tide that lifted all boats, including Node, but Node is built with much more of the system implemented in JS, so it is architecturally incapable of the kind of performance Bun/uWebsockets achieves.

nailer|2 months ago

One important original point of node was that v8 made JS very fast by compiling to machine code, plus it’s had multithreading built in for a decade.

whizzter|2 months ago

Machine code yes (along with Spidermonkey, JSC and Nashorn), the timeframe around 2005-2010 saw the introduction of JIT'ed JS runtimes. Back then however JS was firmly single-threaded, it was only with the introduction of SharedArrayBuffer that JS really started to receive multithreading features (outside of SharedArrayBuffer and other shareable/sendable types, a runtime could opt to run stuff like WebWorkers/WebAudioWorkers in separate processes).

Early Node f.ex. had a multi-process setup built in, Node initially was about pushing the async-IO model together with a fast JS runtime.

Why Bun (and partially Deno) exists is because TypeScript helps so damn much once projects gets a tad larger, but usage with Node hot-reloading was kinda slow, multiple seconds from saving a file until your application reloads. Even mainline node nowadays has direct .ts file loading and type erasing to quicken the workflow.

stefan_|2 months ago

That is the most absurd thing I've heard in 20 years. Chrome literally was launched on performance, for JS and beyond.

The reality is that the insane "JS ecosystem" will rally around whatever is the latest hotness.

umanwizard|2 months ago

> Prior to Bun, there was little focus on performance

v8 is one of the most advanced JIT runtimes in the world. A lot of people have spent a lot of time focusing on its performance.

satvikpendem|2 months ago

That's because it's not written in JS at all but a compiled systems language, no wonder it's gonna be fast.

denismenace|2 months ago

Virtually all JavaScript engines are written in compiled languages. (Most runtimes for that matter nut just JS)