5 ms·
Reminds me of LLVM's EfficiencySanitizer that will probably land in 3.9: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098355.html http://lists.llvm.org/p
by cm3 11y ago
Reminds me of LLVM's EfficiencySanitizer that will probably land in 3.9: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098355.html http://lists.llvm.org/pipermail/llvm-dev/2016-April/098355.h...
- Manishearth 11y agoI'm personally very interested in "non-optimizing optimizers", essentially lint passes which point out places where you may optimize something without actually making that optimization. The advantage to this is that you get access to a lot of optimizations which would otherwise require you to make a lot of things undefined behavior to make work. An example of this is the escape analysis lint in rust-clippy, which can detect if an allocation via Box/Vec/String is unnecessary (though right now it only supports one of those and I need to work on it more) and tell you how to remove it.
- llogiq 11y agoBy the way, I recently tried to get rid of some `vec!`s in the benchmarksgame entries (well, to see if I could), but got into trouble with IntoIterator implementations, so an extension of EscapeAnalysis would be great!
- Manishearth 11y agoI suspect that the escape analysis lint will never be as powerful as a human looking in a reasonably small region of code to remove specific allocations, so it wouldn't be able to help here. Probably. Its power is in that it can find unnecessary allocations in a large codebase.
- samth 11y agoYou might be interested in Vincent St-Amour's optimization coach: https://github.com/stamourv/optimization-coach https://github.com/stamourv/optimization-coach
- GFK_of_xmaspast 11y agoBy my reading of that thread, it comes across as more of a "hey we were going to start sketching out a thing" and less of "hey this is ready to go'.