Remix.run Logo
kylecarbs 4 hours 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!

krig 4 hours ago | parent | next [-]

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

logsr 2 hours ago | parent [-]

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

krig an hour ago | parent | next [-]

> Bun, Zig, and uWebsockets are passion projects run by individuals with deep systems programming expertise. furthest thing from vibe coding imaginable.

Sure, I definitely will not throw projects like Zig into that bucket, and I don't actually think Bun is vibe-coded. At least that _used_ to be true, we'll see I guess...

Don't read a snarky comment so literally ;)

creata 2 hours ago | parent | prev [-]

> 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

That sounds like an implementation difference, not an architectural difference. If they wanted to, what would prevent Node or a third party from implementing parts of the stdlib in a faster language?

satvikpendem 4 hours ago | parent | prev | next [-]

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

denismenace 3 hours ago | parent [-]

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

satvikpendem 3 hours ago | parent [-]

My mistake, I was thinking of the wider ecosystem not the runtime, ie formatters, bundles and linters like Biome, oxc, etc being written in Rust or other compiled languages. That's where I saw the biggest speedup, because developers of them decided to use a compiled language to write them in instead of JS via a JS runtime where you'll inherently be limited by even a JIT language.

nailer 4 hours ago | parent | prev | next [-]

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 an hour ago | parent [-]

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_ 4 hours ago | parent | prev [-]

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.