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
#[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).
The following code:
is significantly FASTER then
ptr::copy_nonoverlapping
, for smallcount
s, and cases wherecount
is not known at compile time. (2-3 times for 8 byte copy).People suggest that this happens, because compiler does not inline
copy_nonoverlapping
code:https://users.rust-lang.org/t/ptr-copy-nonoverlapping-slower-then-manual-per-byte-copy/75588/2?u=tower120
I'm not sure if this is actually a bug though...
The text was updated successfully, but these errors were encountered: