[PW_SID:1098152] riscv: lib: add optimized memchr() and extend KUnit tests#1985
[PW_SID:1098152] riscv: lib: add optimized memchr() and extend KUnit tests#1985linux-riscv-bot wants to merge 3 commits into
Conversation
This implementation leverages word-at-a-time comparisons and the RISC-V Zbb extension to accelerate character searching, falling back to a generic byte-by-byte loop on systems without Zbb support. Benchmark results (QEMU TCG, rv64): | len | zbb | Wozbb | default | % Wozbb | % zbb | |------|--------|-------|---------|---------|---------| | 1 | 22.9 | 26 | 22.1 | 17.64 % | 3.62 %| | 7 | 115.5 | 130.6 | 100.1 | 30.46 % | 15.38 %| | 8 | 184.3 | 143.3 | 117.2 | 22.26 % | 57.25 %| | 16 | 322 | 205.1 | 179.7 | 14.13 % | 79.19 %| | 31 | 361 | 247.4 | 221.7 | 11.59 % | 62.83 %| | 64 | 880 | 280.6 | 233.2 | 20.32 % | 277.35 %| | 127 | 961.3 | 307.9 | 271.4 | 13.44 % | 254.20 %| | 512 | 1812.9 | 325.6 | 294.1 | 10.71 % | 516.42 %| | 1024 | 1973.2 | 335.4 | 273.8 | 22.49 % | 620.67 %| | 3173 | 2245.9 | 338.7 | 288.6 | 17.35 % | 678.20 %| | 4096 | 2327.5 | 345 | 317.5 | 8.661 % | 633.07 %| Signed-off-by: Milan Tripkovic <Milan.Tripkovic@rt-rk.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Extend the string benchmarking suite to include memchr(). Extend the string unit test to include memchr() Signed-off-by: Milan Tripkovic <Milan.Tripkovic@rt-rk.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 1: "[1/2] riscv: lib: add memchr() implementation" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
|
Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()" |
cd9d421 to
a1231b7
Compare
PR for series 1098152 applied to workflow__riscv__fixes
Name: riscv: lib: add optimized memchr() and extend KUnit tests
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1098152
Version: 1