3 ms·
Summary: about a decade ago or so, Ertl ran into some regressions in GCC uncovered by benchmarking his Forth implementation, logged bugs for them, and they were
by kazinator 12y ago
Summary: about a decade ago or so, Ertl ran into some regressions in GCC uncovered by benchmarking his Forth implementation, logged bugs for them, and they were fixed.
Some of them were in obscure GCC extensions, like notably computed goto. The compiler started generating code involving branches to a common instruction that does the actual indirect jump, instead of just doing that indirect jump.
It's easy to understand how a performance regression affecting such a feature can slip through, if the behavior is otherwise correct.
It doesn't mean that the GCC sky is falling, as all the trolling in that newsgroup would have you believe.
- nkurz 12y agoI come back to this a day later, after anyone is likely to read it, because this response continues to bother me. Your response isn't false, but I feel it really mischaracterizes the issue. These are not trolls in a newsgroup simply trying to get a rise out of people. They may be wrong, the current optimization approach may be the best choice available, and GCC may have made all the correct choices to fulfill its mission as it defines it, but summarizing as ~"once there bugs and then they were fixed" misses the point. These are multiple well-respected CS researchers and extremely experienced C programmers saying they can no longer use C (not just GCC) in the manner they once did because they believe it's no longer a possible to make the language work the way they want it to. You appear to be an expert C programmer as well, and don't agree. Disagreement is fine, but I think you would be wrong to completely discount what they are saying. I think it's a matter of what level of optimization you are aiming for. I'm mostly working on integer compression, and find that I am no longer able to use C to generate code that maximizes the performance of modern processors. Ertl's work on threaded dispatch has led to large improvement in the implementation of modern interpreters (http://bugs.python.org/issue4753 http://bugs.python.org/issue4753). As a tool, C is stronger if it can take advantage of techniques such as this, and there don't appear to be any other languages higher than assembly where tip-top performance is possible. I may be just a cranky anonymous troll, but Ertl should be considered a canary telling us that we are in danger of losing the ability to make similar optimizations.