3 ms·
The data oriented design stuff was mostly in the new compiler implementation (which can lead to faster compilation, but is unrelated to the performance of the c
by flohofwoe 4y ago
The data oriented design stuff was mostly in the new compiler implementation (which can lead to faster compilation, but is unrelated to the performance of the compiler output).
But Zig might have some features which might theoretically allow the compiler to generate slightly more performant code (compared to portable standard C code). E.g. since function arguments are read only, the compiler might be able to avoid a copy on the stack when passing structs > 16 bytes by value.
Also since Zig programs are (AFAIK) generally compiled as a unity build, the compiler has more inlining opportunities compared to a conventionally linked C program (without LTO).
Etc... etc.. so theoretically it might be possible, but I'd still take such statements with a grain of salt until demonstrated on real world code.