rust-lang/rust-clippy
在 GitHub 查看lint long chains of into/float additions/multiplications
Open
#1,243 建立於 2016年9月25日
A-lintL-perfT-ASTgood first issue
倉庫指標
- Star
- (10,406 star)
- PR 合併指標
- (平均合併 19天 22小時) (30 天內合併 113 個 PR)
描述
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.