Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are there advantages to this other than, I guess it being convenient? (Zig noob here.)

Eg, are there C to Zig ports that have had a demonstrable performance or memory-safety gain or something like that?

(Specifically, I mean over a C-lib wrapper compiled using Zig, as matching this case.)



The Zig compiler itself is a good example: https://kristoff.it/blog/zig-self-hosted-now-what/

"The new self-hosted compiler reduces memory usage 3x compared to the old C++ implementation"


Have to point out that this includes second system optimizations. Just porting C over to Zig won't give you that 3x reduction. For others, I also highly recommend the video linked in that blog post.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: