Page MenuHomeFreeBSD

libc: scalar strchrnul() in RISC-V assembly
AcceptedPublic

Authored by strajabot on Jul 19 2024, 8:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 8:53 PM
Unknown Object (File)
Fri, Oct 10, 3:19 PM
Unknown Object (File)
Fri, Oct 10, 3:19 PM
Unknown Object (File)
Sep 3 2025, 3:40 PM
Unknown Object (File)
Sep 1 2025, 9:08 AM
Unknown Object (File)
Aug 27 2025, 4:01 PM
Unknown Object (File)
Aug 27 2025, 4:01 PM
Unknown Object (File)
Aug 26 2025, 2:26 AM
Subscribers

Details

Reviewers
fuz
emaste
Group Reviewers
riscv
Summary

Scalar implementation of strchrnul() in RISC-V assembly and changes to the
corresponding manpage.

Performance was benchmarked on a HiFive Unmatched (SiFive HF105-001) board
using: https://github.com/clausecker/strperf

os: FreeBSD
arch: riscv
        │ strchrnul_baseline │          strchrnul_scalar           │
        │       sec/op       │   sec/op     vs base                │
Short            680.2µ ± 5%   435.3µ ± 0%  -36.01% (p=0.000 n=20)
Mid              314.7µ ± 3%   221.4µ ± 0%  -29.63% (p=0.000 n=20)
Long             152.3µ ± 0%   138.5µ ± 0%   -9.08% (p=0.000 n=20)
geomean          319.5µ        237.2µ       -25.75%

        │ strchrnul_baseline │          strchrnul_scalar          │
        │       MiB/s        │   MiB/s     vs base                │
Short             183.8 ± 5%   287.2 ± 0%  +56.27% (p=0.000 n=20)
Mid               397.3 ± 3%   564.6 ± 0%  +42.12% (p=0.000 n=20)
Long              820.5 ± 0%   902.5 ± 0%   +9.99% (p=0.000 n=20)
geomean           391.3        527.0       +34.68%
Test Plan

Tested using the FreeBSD test suite

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 58741
Build 55629: arc lint + arc unit