I have made modifications to the assembly implementation of the riscv64 strlen function, mainly focusing on address alignment processing to avoid the problem of data crossing pages during vector instruction memory access. I think the assembly implementation of strlen is necessary. In glibc, X86_64, aarch64, alpha, and others all have assembly implementations of this function, while for riscv64, it is blank. I have also analyzed the test sets of Spec2006 and Spec2017, and the strlen function is also a hot topic. Please review the patch again and look forward to your reply. Fei Zhang > -----原始邮件----- > 发件人: "A. Wilcox" > 发送时间: 2023-03-22 14:27:33 (星期三) > 收件人: musl@lists.openwall.com > 抄送: > 主题: Re: [musl] [PATCH]Implementation of strlen function in riscv64 architecture > > The content of the message was sent as an image. > > For those who cannot view images, I've reproduced the text below: > > On Mar 22, 2023, at 1:21 AM, 张飞 wrote: > > > > Hi: > > > > I implemented vectorization of the strlen function in the riscv64 > > architecture, which is controlled by __riscv_vector definition. Due > > to lack of support for risc-v V expansion in hardware, I conducted > > performance tests on a simulator, which was more than 10 times the > > performance achieved in C language. In terms of functionality, I > > tested the string length from 1 byte to 64 Mb, and the alignment of > > different addresses at the beginning of the string. > > > > > > Please review it.I'm Looking forward to your reply,thanks. > > > > > > > > Fei Zhang > >