4 ms·
This is the “the compiler represents a typical workload” fallacy.
by moomin 9y ago
This is the “the compiler represents a typical workload” fallacy.
- tzar 9y agoHaving read only the first paragraph of the paper, I feel I already disagree: > Trying to make an optimizing compiler as simple as possible and yet as powerful as necessary requires, before all else, a measurement standard, by which both simplicity and power can be judged. The goal is not to use the compiler as a proxy for runtime performance of other compiled programs, but rather a benchmark of a particular value (or maxim). You may not share that value, but I think you've mistaken the motivation.
- sarah180 9y agoHaving read the second paragraph of the paper, they propose that the time and size cost of self-compilation is a useful benchmark for whether the additional complexity of a compiler feature is justified by its benefits. I agree with moomin that accepting this benchmark carries an implicit assumption that self-compilation is a representative workload. The paper doesn't argue "you should have some benchmark": it argues for this particular one.
- tzar 9y agoIf it were merely used as a representative workload, one would apply a discount to the complexity and size of the compiler since it can be assumed that compiling a larger and more complicated program should take longer (i.e. the measurement would be something like loc/s). But that's not the case here, because the value of simplicity and size is pitted against performance. I think the delta of agreement here is small; I just mean to note that “justified” here includes the value of the simplicity of the compiler. I have a personal bias towards the paper of course, because I would love to be downstream of a fallacy that gave me the development ergonomics of any of the Wirth or Wirth-like languages.
- chrisseaton 9y agoSimilarly, I think one reason that the programming-language community likes functional programming more than most people is that a compiler is fundamentally one big pure function.
- nimish 9y agoWell, it turns out languages written for PL and compiler research make writing programming languages and compilers easier...