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)
Fri, Nov 7, 5:33 AM
Unknown Object (File)
Thu, Nov 6, 5:25 AM
Unknown Object (File)
Wed, Nov 5, 1:17 AM
Unknown Object (File)
Wed, Oct 29, 9:53 AM
Unknown Object (File)
Wed, Oct 29, 9:49 AM
Unknown Object (File)
Wed, Oct 29, 4:45 AM
Unknown Object (File)
Mon, Oct 27, 12:49 PM
Unknown Object (File)
Fri, Oct 24, 2:08 PM
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 Not Applicable
Unit
Tests Not Applicable

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