Page MenuHomeFreeBSD

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

Authored by strajabot on Jul 19 2024, 8:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 28, 8:24 AM
Unknown Object (File)
Wed, Jan 28, 7:08 AM
Unknown Object (File)
Sat, Jan 10, 4:35 PM
Unknown Object (File)
Sat, Jan 10, 3:54 PM
Unknown Object (File)
Sat, Jan 10, 3:33 PM
Unknown Object (File)
Sat, Jan 10, 8:09 AM
Unknown Object (File)
Sat, Jan 10, 8:09 AM
Unknown Object (File)
Sat, Jan 10, 5:39 AM
Subscribers

Details

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

Event Timeline

This looks reasonable. Accepted pending final acceptance test.

This revision is now accepted and ready to land.Aug 7 2024, 10:55 AM