Skip to content

Fix overlap problem

Choose a tag to compare

@MeteorsLiu MeteorsLiu released this 13 Oct 12:04
· 1 commit to main since this release

To prevent overlap copy problem, there's a function which is written in ASM to check about the memory address.

If there's no overlap address and the memory area we need to copy is large(over 15500 size), use REP MOVS by default.
If yes, use Golang's memmove, because Golang did a good job at overlap copying.

Performance Test: Benchmark Article

When CPU supports ERMS, REP MOVS is really fast for large buffers copy.