3 ms·
I think Go hoped GCC would be their high-performance compiler, but it never got the attention it needed. GCC has better micro-optimization in gccgo, but the co
by oofabz 11y ago
I think Go hoped GCC would be their high-performance compiler, but it never got the attention it needed.
GCC has better micro-optimization in gccgo, but the compiler lacks important features like escape analysis and an up-to-date runtime so it's slower on real-world code.
- pcwalton 11y agoYeah, it goes to show that you really want a mid-level language-specific IR (which is what the Plan 9-based compilers have) if your language is at all high level. I think the ideal for best performance of generated code is 3 IRs: a mid-level language-specific IR for high-level optimizations (especially around memory management and devirtualization), a low-level IR for lower-level optimizations (e.g. algebraic simplifications), and a codegen IR (for instruction selection and scheduling). This is what Swift is doing, as far as I can tell.