3 ms·
C was also designed for single-pass compilation. Among many other things that people now dislike about C, this is why C requires forward declarations. C compil
by wahern 5y ago
C was also designed for single-pass compilation. Among many other things that people now dislike about C, this is why C requires forward declarations.
C compilers became slow because of the optimizations they accreted. Plus, I imagine it just wasn't a priority for the vendors in the way it was for Borland Pascal. I'm curious how the Borland C compiler compared in speed to their Pascal compiler and to other C compilers.
- cb321 5y agoTinyC/tcc [1] still is a single-pass compiler and can go all the way to ELF files (or directly running via tcc -run) in a few milliseconds - sometimes an order of magnitude faster than the minimal start-up time of an interpreter like Python. But yes, gcc will generate faster running object code..a long standing trade off (like -O0 vs -O3, etc.). [1] https://github.com/TinyCC/TinyCC https://github.com/TinyCC/TinyCC