Hi, I’ve just finished coding up and debugging a 1D and 3D shock physics benchmark for Zig: The larger 3D Zig benchmark runs about 15% faster than the C reference implementation compiled with gcc -O3 on my machine ( which is faster than gcc -O2). I used the aarch64 tarball off the download page to do my run. I notice that there are a lot of unexploited “low hanging fruit” peephole optimization opportunities in the FP assembly language, e.g. fmadd/fmsub/fnmsub. ZIg can only get much fast...| Ziggit
I’m running into strange behavior with zig build run, and I’m hoping others might help explain what’s happening. I have a simple Zig app that I can run with zig build run. But if I run the compiled binary afterwards, the performance is 10x worse than with zig build run. src/main.zig const std = @import("std"); pub fn countBytes(reader: anytype) !u32 { var count: u32 = 0; while (true) { _ = reader.readByte() catch |err| switch (err) { error.EndOfStream => { ...| Ziggit