Skip to content

Commit

Permalink
Auto merge of #116846 - krtab:slice_compare_no_memcmp_opt, r=the8472
Browse files Browse the repository at this point in the history
A more efficient slice comparison implementation for T: !BytewiseEq

(This is a follow up PR on #113654)

This PR changes the implementation for `[T]` slice comparison when `T: !BytewiseEq`. The previous implementation using zip was not optimized properly by the compiler, which didn't leverage the fact that both length were equal. Performance improvements are for example 20% when testing that `[Some(0_u64); 4096].as_slice() == [Some(0_u64); 4096].as_slice()`.
  • Loading branch information
bors committed Jan 9, 2024
2 parents ceaec15 + cf54bbb commit 7a2c5a5
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 7a2c5a5

Please sign in to comment.