News for hackers. Stuff that matters.
Re:Bun v0.7.0 by jasfi on Saturday July 22, 2023 @03:17AM (#36824106)
Does anyone know why Bun (without --smol) sometimes uses much more memory than Node? Is this due to not being v1 yet?

I'm also wondering if some old benchmarks could now be irrelevant.

Re:Bun v0.7.0 by uhryks on Saturday July 22, 2023 @04:23AM (#36824460)
I don't know how different it is, but my guess is mostly that Node.js uses v8 and bun uses JavascriptCore.
Re:Bun v0.7.0 by jer0me on Saturday July 22, 2023 @05:08AM (#36824662)
Re:Bun v0.7.0 by degun on Saturday July 22, 2023 @05:33AM (#36824799)
Am I misinterpreting or does it sound a bit arrogant as a response?
Re:Bun v0.7.0 by kissgyorgy on Saturday July 22, 2023 @06:16AM (#36824979)
Yes, you are misinterpreting it.
Re:Bun v0.7.0 by Jarred on Saturday July 22, 2023 @05:32AM (#36824792)
The heap size grows faster & stays larger in the default configuration, adjusted for the amount of memory the computer has

We might enable —smol by default though.

The garbage collector configuration in JavaScriptCore is still kind of a mystery to me. I think we would ideally have something in-between —smol and default. I expect we will fiddle with this more shortly before or after 1.0

Re:Bun v0.7.0 by jasfi on Saturday July 22, 2023 @08:37AM (#36825706)
OK thanks. Is that noted on the Bun site? Sounds like an FAQ.
Re:Bun v0.7.0 by foo_bar_2000 on Saturday July 22, 2023 @08:13AM (#36825560)
Use v8 (node/deno) if JSC (bun) doesn't suit you

https://medium.com/walmartglobaltech/react-native-memory-pro...

Re:Bun v0.7.0 by paxys on Saturday July 22, 2023 @08:39AM (#36825722)
Using more memory to increase performance is a good thing. All software should be doing it, especially one that is meant to run server-side. Who cares if Bun takes a couple hundred MBs extra? It is also like 5-20x faster than Node for basic tasks.
Re:Bun v0.7.0 by wiseowise on Saturday July 22, 2023 @01:03PM (#36827850)
> Who cares if Bun takes a couple hundred MBs extra (which is worth like $0.20)?

Users of a software whose author decided to use tool that only cares about server side.

Re:Bun v0.7.0 by jasfi on Sunday July 23, 2023 @12:24AM (#36832544)
I wanted to make sure that was the case, instead of inefficiency.