Re:C as an intermediate language (2012)
by WalterBright on Saturday January 20, 2018 @03:51PM
(#16195359)
Things that make it slow:
1. Compile the code
2. Generate strings for C code (C is much larger than intermediate code). Translating things like integers to strings is slow.
3. Writing the file out, as opposed to just keeping the data in memory.
C compilers are already slow (due to the preprocessor and phases of translation), so add your compiler on top of that, and you're going to have an unfixably slow solution.
1. Compile the code 2. Generate strings for C code (C is much larger than intermediate code). Translating things like integers to strings is slow. 3. Writing the file out, as opposed to just keeping the data in memory.
C compilers are already slow (due to the preprocessor and phases of translation), so add your compiler on top of that, and you're going to have an unfixably slow solution.