3 ms·
I work almost full-time on C++ optimization and I find most type of such benchmarks moot, and _not_ because of methodology flaws. We need to stop just looking
by p0nce 13y ago
I work almost full-time on C++ optimization and I find most type of such benchmarks moot, and _not_ because of methodology flaws.
We need to stop just looking at numbers and investigate what these compilers allow in terms of productivity, optimization opportunities and explicit control of generated code.
If you look at x264 numbers you'll see that there is up to a x10 gap between hand-optimized assembly and native C, and I believe that this gap exist in most fast programs because optimizing backends are too much black-boxes that consistently produce quite good, even sometimes amazing results, but with little control or feedback.
The nature of highly optimized code is detailed, explicit control of what should happen. I will take a poorly optimizing compiler any day if it allows me complete control of the backend optimizations it chooses, if I can give him register hints that actually matter, if it stop compiling and ask for the annotations he need to optimize better. C++ compilers are good at this game but this could be taken further.
Also it's unfair to never look at language productivity at the same time as speed, since the ability to produce fast programs will be notably affected by the speed at which we can achieve that anyway.
- dom96 13y agoI agree. However, how do you suggest we judge languages in terms of their productivity, isn't that highly subjective? I have never seen anyone do a proper 'productivity benchmark', but perhaps with some rigor it could be done reliably.
- p0nce 13y agoI don't know. All methods I can think of are expensive and wasteful. So perhaps it's a good proxy.
- fread2281 13y agoI wonder how Rust is at this.