File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2055,7 +2055,7 @@ declare_clippy_lint! {
20552055 /// Checks for use of `.collect::<Vec<String>>().join("")` on iterators.
20562056 ///
20572057 /// ### Why is this bad?
2058- /// `.collect::<String>()` is more concise and usually more performant
2058+ /// `.collect::<String>()` is more concise and might be more performant
20592059 ///
20602060 /// ### Example
20612061 /// ```rust
@@ -2070,9 +2070,12 @@ declare_clippy_lint! {
20702070 /// println!("{}", output);
20712071 /// ```
20722072 /// ### Known problems
2073- /// While `.collect::<String>()` is more performant in most cases , there are cases where
2073+ /// While `.collect::<String>()` is sometimes more performant, there are cases where
20742074 /// using `.collect::<String>()` over `.collect::<Vec<String>>().join("")`
20752075 /// will prevent loop unrolling and will result in a negative performance impact.
2076+ ///
2077+ /// Additionlly, differences have been observed between aarch64 and x86_64 assembly output,
2078+ /// with aarch64 tending to producing faster assembly in more cases when using `.collect::<String>()`
20762079 #[ clippy:: version = "1.61.0" ]
20772080 pub UNNECESSARY_JOIN ,
20782081 pedantic,
You can’t perform that action at this time.
0 commit comments