summaryrefslogtreecommitdiff
path: root/arch/riscv/lib/string.c
AgeCommit message (Collapse)AuthorFilesLines
2023-04-17riscv: Optimize memcpy with aligned versionMason Huo1-61/+238
Optimizing the 128 byte align case, this will improve the performance of large block memcpy. Here we combine the memcpy of glibc and kernel. Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
2023-04-03riscv: optimized memcpy Write a C version of memcpy() which uses the biggest ↵Matteo Croce1-0/+91
data size allowed, without generating unaligned accesses. The procedure is made of three steps: First copy data one byte at time until the destination buffer is aligned to a long boundary. Then copy the data one long at time shifting the current and the next u8 to compose a long at every cycle. Finally, copy the remainder one byte at time. On a BeagleV, the TCP RX throughput increased by 45% Signed-off-by: Matteo Croce <mcroce@microsoft.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>