News for hackers. Stuff that matters.
Re:Zig is now self–hosted by default by labrador on Sunday August 21, 2022 @03:05AM (#32538012)
> Zig produces smaller, faster binaries than C++

This seems fairly significant to me and makes me wonder how this is possible with all the effort that has gone into optimizing C++

Re:Zig is now self–hosted by default by rk06 on Sunday August 21, 2022 @07:42AM (#32539220)
Because they can't do breaking changes and must live with legacy baggage.

While zig can work use modern techniques without such issues

Re:Zig is now self–hosted by default by labrador on Wednesday August 24, 2022 @01:01AM (#32575182)
This is wrong because you can strip out C++ code you don't need. Green code doesn't need to worry about legacy baggage
Re:Zig is now self–hosted by default by rk06 on Wednesday August 24, 2022 @10:48PM (#32588833)
And how do you identify the unneeded code in a compiler?

Which is used all over the world?

Re:Zig is now self–hosted by default by kaba0 on Sunday August 21, 2022 @04:41AM (#32538389)
A smaller binary will not necessarily be faster - specialization can bloat code size, but having a specific version for a given subtype can be much faster. It’s a tradeoff.
Re:Zig is now self–hosted by default by kristoff_it on Sunday August 21, 2022 @06:41AM (#32538904)
right after that sentence there's a link to a talk that explains one way this is true
Re:Zig is now self–hosted by default by labrador on Sunday August 21, 2022 @11:56AM (#32541400)
We can hardly be expected to watch a 46 minute video on "A Practical Guide to Applying Data-Oriented Design" to find our answer. It seems unpromising on the surface.
Re:Zig is now self–hosted by default by JonChesterfield on Sunday August 21, 2022 @12:31PM (#32541761)
Data oriented design is why the thing is faster.
Re:Zig is now self–hosted by default by labrador on Sunday August 21, 2022 @01:57PM (#32542682)
I guess I'll wait for the benchmarks comparing C++ and Zig over a variety of problem solutions to see which one is faster