File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2055,7 +2055,7 @@ declare_clippy_lint! {
2055
2055
/// Checks for use of `.collect::<Vec<String>>().join("")` on iterators.
2056
2056
///
2057
2057
/// ### 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
2059
2059
///
2060
2060
/// ### Example
2061
2061
/// ```rust
@@ -2070,9 +2070,12 @@ declare_clippy_lint! {
2070
2070
/// println!("{}", output);
2071
2071
/// ```
2072
2072
/// ### 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
2074
2074
/// using `.collect::<String>()` over `.collect::<Vec<String>>().join("")`
2075
2075
/// 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>()`
2076
2079
#[ clippy:: version = "1.61.0" ]
2077
2080
pub UNNECESSARY_JOIN ,
2078
2081
pedantic,
You can’t perform that action at this time.
0 commit comments