You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ptr::copy_nonoverlapping slower then manual bytewise copy #97022
#[inline]unsafefncopy_bytes(src:*constu8,dst:*mutu8,count:usize){for i in0..count{*dst.add(i) = *src.add(i);}}
is significantly FASTER then ptr::copy_nonoverlapping, for small counts, and cases where count is not known at compile time. (2-3 times for 8 byte copy).
Activity
saethlin commentedon May 14, 2022
Similar to #92993
mati865 commentedon May 29, 2022
Related to #83785
zeroflaw commentedon Sep 7, 2023
fyi, this now compiles down to the same assembly as copy_nonoverlapping.