4 ms·
I don't have a source, and maybe I'm misremembering, but I think compilers (for software) and CPU production tooling (for hardware) both bootstrap off their own
by indenturedsmile 7y ago
I don't have a source, and maybe I'm misremembering, but I think compilers (for software) and CPU production tooling (for hardware) both bootstrap off their own performance.
A better compiler can compile itself more efficiently, same for CPU/chip layout systems.
- tomstuart 7y agoYou’re exactly right about this. Of course compilers which compile themselves come with their own risks! https://dl.acm.org/citation.cfm?id=358210 https://dl.acm.org/citation.cfm?id=358210
- dllthomas 7y agoRisks which can be ameliorated: https://dwheeler.com/trusting-trust https://dwheeler.com/trusting-trust
- richev 7y agoThe original version of the C# compiler was written in C and C++, but today's version is indeed itself written in C#! https://stackoverflow.com/questions/27513234/in-which-language-is-the-c-sharp-compiler-written https://stackoverflow.com/questions/27513234/in-which-langua...
- hermitdev 7y agoOften, the first bootstrapped is the bare minimum to get basic functionality available, to then build upon what features you can support. Its been a while, and I think it was gcc 7.x timeframe, and IIRC, you had to have at a min, gcc 4.x available to bootstrap, and it took something like 3 separate bootstrap iterations to get the final compilers was like 4-6 hours if memory serves.
- erklik 7y ago> compilers Absolutely. Otherwise, all compilers would be written in Assmebly. Most compilers used today are written in C and the compiler for C (GCC) is written in C itself. The C language was also written by Ken Thomson, because he was unhappy with the BCPL language, so the compiler for C was originally written in B. So on and So forth. More Recently, the initial compiler for Rust was written in OCaml but is now written in Rust itself.
- umanwizard 7y agoSlight nit: GCC has been written in C++ (not C) for several years now.
- Vi0 7y agoThis is accurate, but compiler runtime efficiency and compiler effectiveness at producing efficient programs are inherently orthogonal. There is certainly a major milestone in each new language though, when it becomes feature complete enough to write its own compiler.