News for hackers. Stuff that matters.
Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by brabel on Wednesday May 17, 2023 @02:47AM (#35972011)
> but produces native code similar to compiling C.

That's very misleading. For one, Java running native still needs a Garbage Collector, maintains Object headers which increase memory usage, can do things like reflection for configured classes, can load services via the ServiceLoader, schedule Threads and manage executors, and many other things that are "expected" to any Java application... in summary: native executables still have a Java runtime embedded into them (called Substrate VM, by the way), making them very different from C (much more like Go).

Also,notice that native Java executables still tend to have a lower "peak performance" (i.e. once a "normal" JVM has warmed up, it will almost certainly be faster than a native executable because the latter cannot do JIT compilation to take advantage of runtime profiling, like a normal JVM does).

Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by pjmlp on Wednesday May 17, 2023 @03:36AM (#35972305)
It also misleading to think C doesn't have a runtime.

https://learn.microsoft.com/en-us/cpp/c-runtime-library/c-ru...

https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html

https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_...

And many more, not feeling like linking documentation from all C compilers.

In fact this is so relevant even for C, that ISO C has a special section for deployments without runtime support, named freestanding C.

"In a freestanding environment (in which C program execution may take place without any benefit of an operating system), the name and type of the function called at program startup are implementation-defined. There are otherwise no reserved external identitiers. Any library facilities available to a freestanding propram are implementation-defined."

Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by brabel on Wednesday May 17, 2023 @07:37AM (#35973884)
That's not at all comparable.

From your link:

"Most of the routines in libgcc handle arithmetic operations that the target processor cannot perform directly."

You're trying to imply the Java native runtime is comparable to liggcc?? That's silly.

Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by ithkuil on Wednesday May 17, 2023 @08:06AM (#35974110)
I think the point was that it's a matter of degree and not of substance
Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by pjmlp on Wednesday May 17, 2023 @11:03AM (#35976282)
A runtime is a runtime, regardless of the size and features checkbook.