We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83b9783 commit 33bd326Copy full SHA for 33bd326
src/mem/impls.rs
@@ -3,7 +3,11 @@ use core::intrinsics::likely;
3
const WORD_SIZE: usize = core::mem::size_of::<usize>();
4
const WORD_MASK: usize = WORD_SIZE - 1;
5
6
-const WORD_COPY_THRESHOLD: usize = 2 * WORD_SIZE;
+const WORD_COPY_THRESHOLD: usize = if 2 * WORD_SIZE > 16 {
7
+ 2 * WORD_SIZE
8
+} else {
9
+ 16
10
+};
11
12
#[inline(always)]
13
unsafe fn copy_forward_bytes(mut dest: *mut u8, mut src: *const u8, n: usize) {
0 commit comments