Open
Description
suboptimal_flops
is very useful. Most of its suggestions are wins both for readability and performance, however some significantly reduce readability in my opinion.
E.g.
a * 2.0 + 3.0
is a lot more readable than
a.mul_add(2.0, 3.0)
in particular for new developers that may not be familiar with mul_add
.
We'd love to enable suboptimal_flops
for our code-base, but there is definitely some friction where it makes suggestions that just makes the code less readable in code that doesn't need the absolute maximum performance.
I propose splitting suboptimal_flops
into two smaller lint groups such that one group contains all lints that improve performance and readability, and the other contains those that improve performance, but may impact readability negatively.
Drawbacks
More lint types