rust-lang/rust-clippy
Vedi su GitHublint long chains of into/float additions/multiplications
Open
#1243 aperta il 25 set 2016
A-lintL-perfT-ASTgood first issue
Metriche repository
- Star
- (10.406 star)
- Metriche merge PR
- (Merge medio 19g 22h) (113 PR mergiate in 30 g)
Descrizione
In generall, (a+b+c)+(d+e+f) is faster to compute than a+b+c+d+e+f, because the former reduces data dependencies, allowing the CPU to run additions in parallel. For float arithmetic, the tree-like addition may improve numerical stability. Suggest inserting parenthesis.