Potential of a compiler that creates the executable at once

rempas rempas at tutanota.com
Fri Feb 11 12:53:07 UTC 2022


On Friday, 11 February 2022 at 04:18:42 UTC, Era Scarecrow wrote:
>  I believe most of the compilers base is involving optimization 
> for various architectures and versions of CPU's, along with 
> cross-compiling.

Yeah but when I don't cross-compile, I only compile for one OS 
and one instruction set. Code for other cases will not get 
executed so I cannot see how this can play a role. TCC also 
support a lot of architectures and Operating Systems (even 
Windows natively If I'm not wrong). Unless I don't understand 
what you mean...

> GNU/GCC has tons of legacy code in the back that it still uses 
> i believe.

Yeah, that's the problem we will never be able to solve. New and 
better practices will always be invented so to get the best 
possible performance, we must always re-write stuff (or parts of 
it) and in the case of big compilers, this will be a pain in the 
ass and I understand it...

>  To note, back in 1996 or about there i wrote an assembler that 
> took x86 and could compiler itself. But wasn't compatible with 
> any other code and couldn't use object files or anything (*as 
> it was all made from scratch when i was 12-14*). However it did 
> compiler directly to a COM file. I'll just say from experience, 
> there are advantages but they don't outweigh the disadvantages. 
> That's my flat opinion going from here.

I wonder what we can do to keep the advantages and take away the 
disadvantages. The second idea I had is probably the answer but I 
would like someone to say something about it directly. Thank you 
for your time!


More information about the Digitalmars-d mailing list