Skip to content

Commit

Permalink
chore: add comment and TODO for non-allocating to_lowercase_into he…
Browse files Browse the repository at this point in the history
…lper

that we're using in `frequency`

[skip ci]
  • Loading branch information
jqnatividad committed Oct 25, 2023
1 parent 3191335 commit 217ea28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cmd/frequency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ impl Args {
}
}

/// this is a non-allocating to_lowercase that uses an existing buffer
/// and should be faster than the stdlib version
/// TODO: if this proves to be faster per the benchmarks, we should use
/// this project-wide over the allocating stdlib version, and move it to utils.rs
#[inline]
fn to_lowercase_into(s: &str, buf: &mut String) {
buf.clear();
Expand Down

0 comments on commit 217ea28

Please sign in to comment.