3 ms·
I don't want to be negative as there's too much of that about but gcc and similar can do some pretty hefty optimisations, and for any real work I suspect those
by throwaway_pdp09 7y ago
I don't want to be negative as there's too much of that about but gcc and similar can do some pretty hefty optimisations, and for any real work I suspect those count for a great deal. Just because zigcc can compile C, neat as it is, doesn't make it a drop-in replacement for gcc.
Does yours do loop unrolling, code hoisting, optimise array accesses to pointer increments, common expression elimination etc?
- lisper 7y agoZig uses clang on the back-end, so while IANA compiler expert, I suspect it does all these things.
- hobo_mark 7y agoYes, it's clang under the hood.
- jeltz 7y agoThis is just a new frontend for clang so it should use all the optimization passes of clang. The main new features are convenient cross compilation and better caching for partial compilation results.