mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 15:12:31 +00:00
compiler-rt: remove len == 1 memcpy branch
This commit is contained in:
parent
a09acd2484
commit
8688b0a3cf
@ -51,9 +51,10 @@ fn memcpy_fast(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) call
|
||||
if (len < 16) {
|
||||
if (len < 4) {
|
||||
if (len == 0) return dest;
|
||||
const a = len & 2;
|
||||
const b = a / 2;
|
||||
dest.?[0] = src.?[0];
|
||||
if (len == 1) return dest;
|
||||
dest.?[1] = src.?[1];
|
||||
dest.?[b] = src.?[b];
|
||||
dest.?[len - 1] = src.?[len - 1];
|
||||
return dest;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user