# compiler-rt: optimize memcpy · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/b7a887f0fb7d166ad93eae62ecd93d1ed173297e)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: b7a887f0fb7d166ad93eae62ecd93d1ed173297e

Requested commit: b7a887f0fb7d166ad93eae62ecd93d1ed173297e

Commit: b7a887f0fb7d166ad93eae62ecd93d1ed173297e

Tree: 3ea5cd898f588e66f038d7a64454557cb6220057

Author: dweiller

Committer: dweiller

## Message

```
compiler-rt: optimize memcpy

The new memcpy function aims to be more generic than the previous
implementation which was adapted from an implementation optimized for
x86_64 avx2 machines. Even on x86_64 avx2 machines this implementation
should be generally be faster due to fewer branches in the small length
cases and generating less machine code.

Note that the new memcpy function no longer acts as a memmove.

```

## Parents

- [d6e1166f1a93e8ed5dd0a74cc0b0daeae5c050a0](https://git.cafe/gitcafe/zig/commit/d6e1166f1a93e8ed5dd0a74cc0b0daeae5c050a0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/b7a887f0fb7d166ad93eae62ecd93d1ed173297e?format=markdown)
