#More fine-grained tradeoff
1 messages · Page 1 of 1 (latest)
ReleaseSmall is still pretty fast. Is there a specific thing youd want this tradeoff to do regarding codegen?
I'm doing a benchmark of C vs. Zig.
When the optimization mode is ReleaseFast, the performance is slightly better than C, but the bin size of Zig is 748k, and that of C is 20k. But when the optimization mode is ReleaseSmall, the performance is significantly worse than that of C, and the bin size of Zig is 16k.
u cant really compare "languages" for speed because it all depends on whos writing in them. Regardless, make sure ur passing the right flags to C as well (-Oz -march=native for Small, -O3 -march=native for Fast). Zig's also doing a bit more than c though (regarding stack traces and the like, not using libc on linux by default) so makes sense that its bigger
All right, thanks.