HomeFreeBSD

libc: scalar strrchr() in RISC-V assembly

Description

libc: scalar strrchr() in RISC-V assembly

Implements strrchr in RISC-V assembly, leading to the following
improvements (performance measured on SiFive HF105-001)

os: FreeBSD
arch: riscv

│ strrchr_baseline │             strrchr_scalar             │
│      sec/op      │   sec/op     vs base                   │

Short 837.2µ ± 1% 574.6µ ± 1% -31.37% (p=0.000 n=20+21)
Mid 639.7µ ± 0% 269.7µ ± 0% -57.84% (p=0.000 n=20+21)
Long 589.1µ ± 0% 176.7µ ± 0% -70.01% (p=0.000 n=20+21)
geomean 680.8µ 301.4µ -55.73%

│ strrchr_baseline │             strrchr_scalar             │
│      MiB/s       │   MiB/s     vs base                    │

Short 149.3 ± 1% 217.6 ± 1% +45.71% (p=0.000 n=20+21)
Mid 195.4 ± 0% 463.6 ± 0% +137.22% (p=0.000 n=20+21)
Long 212.2 ± 0% 707.4 ± 0% +233.40% (p=0.000 n=20+21)
geomean 183.6 414.7 +125.88%

MFC after: 1 month
MFC to: stable/15
Approved by: mhorne, markj (mentor)
Sponsored by: Google LLC (GSoC 2024)
Differential Revision: https://reviews.freebsd.org/D47275

Details

Provenance
strajabotAuthored on Oct 24 2024, 4:18 PM
fuzCommitted on Fri, Oct 31, 12:47 PM
Differential Revision
D47275: libc: scalar strrchr() in RISC-V assembly
Parents
rG48b63e821dec: revoke.2: Remove mention of block special device files
Branches
Unknown
Tags
Unknown