Skip to content

[sinfl] Reduce unnecessary memcpy when memory does not overlap#63

Open
yixy-only wants to merge 1 commit intovurtun:masterfrom
x-ege:perf_sinfl_copy64
Open

[sinfl] Reduce unnecessary memcpy when memory does not overlap#63
yixy-only wants to merge 1 commit intovurtun:masterfrom
x-ege:perf_sinfl_copy64

Conversation

@yixy-only
Copy link

sinfl_copy64 has already ensured that the memory will not overlap before being called, so there is no need to first copy the memory to a temporary buffer before copying it to the target memory.

/* note: src = dst - offs */
if (offs >= 8) {
    /* word copy match */
    sinfl_copy64(&dst, &src);
    sinfl_copy64(&dst, &src);
    do sinfl_copy64(&dst, &src);
    while (dst < out);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant