Skip to content

Commit e79055c

Browse files
committed
Increase the threshold for using word-copy
1 parent 90ff6f5 commit e79055c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mem/impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use core::intrinsics::likely;
33
const WORD_SIZE: usize = core::mem::size_of::<usize>();
44
const WORD_MASK: usize = WORD_SIZE - 1;
55

6-
const WORD_COPY_THRESHOLD: usize = 2 * WORD_SIZE;
6+
const WORD_COPY_THRESHOLD: usize = if 2 * WORD_SIZE > 16 { 2 * WORD_SIZE } else { 16 };
77

88
#[inline(always)]
99
unsafe fn copy_forward_bytes(mut dest: *mut u8, mut src: *const u8, n: usize) {

0 commit comments

Comments
 (0)