2 ms·
Chez Scheme essentially follows this rule, and has since its inception, and it is an incredibly impressive project IMO. It can compile itself in just a few seco
by aseipp 9y ago
Chez Scheme essentially follows this rule, and has since its inception, and it is an incredibly impressive project IMO. It can compile itself in just a few seconds and has a fairly simple architecture (despite having 30+ distinct IR languages in the compilation pipeline, and Scheme being a relatively high level language already, on a ~100k(?) codebase) and it has very good overall performance for generated code that "scales well". It tries not to be too good at the expense of other things, or bad/unwieldly in others. The goal is more that "results are predictable and not fragile", but in practice it means you apply rules like this. It's like putting a monetary budget on feature creep, to me. Chez is a very pleasurable Scheme to work with.
Apparently the only time they really violated this rule was when rearchitecting their compiler from using 5-6 distinct IR languages to over 30 of them using the "Nanopass" approach. So I assume the compile time simply went from "a few seconds" to "a few more seconds", but that's probably OK to do once over ~30 years, I guess. :)
I was told once (by one of the developers of) the Microsoft C# compiler team followed a similar rule where they never made a release that regressed their internal compiler benchmarks, i.e. they were only allowed to get faster. Obviously the .NET runtime does a huge amount of heavy lifting in terms of a C# programs performance, making the compiler a bit simpler, but it still means things like optimizations must pay off in speed and effectiveness. They even rewrote the compiler from C++ to C# at one point and still met this goal somehow, apparently, and once you're at that point -- bootstrapping yourself -- you begin the virtuous cycle of self-improvement. I'd be interested to know if any C# developers have seen the Microsoft .NET compiler get slower -- everything I've heard is that it's very fast and nice to use.