/zigXrustXc

Performance of Zig vs Rust vs C

Primary LanguageZigGNU General Public License v3.0GPL-3.0

Performance of Zig vs Rust vs C

Things to know

My Rust binary is still pretty small compared to normal Rust binaries, check the Cargo.toml file for more info.

But it could be much smaller, see this repo.

All binaries are statically linked, striped and optimized for speed.

  • C -> 716Kb
  • Rust -> 1.2MB
  • Zig -> 16Kb!!!

C and Rust appear to link to libc while Zig doesn't, maybe thats why it's so much smaller.

Results on AMD 9950X:

image

How to run

./run.sh