STRING_BENCH(9)
okay so bestie, welcome to the STRING_BENCH(9) glow-up from the Kernel API Manual β it's giving benchmark-string-functions energy and we are obsessed πβ¨
β¨ NAME β¨
STRING_BENCH β Benchmark string functions. π
π¦ SYNOPSIS π¦
STRING_BENCH (iters , func , ... );
π ARGUMENTS π
itersβ Number of iterations to run. πfuncβ Function to benchmark. π§ͺ...β Variable arguments passed tofunc. π«Ά
πΈ DESCRIPTION πΈ
Okay so this disables preemption and measures the total time in nanoseconds to execute func(__VA_ARGS__) for iters times β including a small warm-up phase, because we warm up before we slay π₯
β CONTEXT β
Disables preemption during measurement. That's the whole context, no cap π
π RETURN π
Total execution time in nanoseconds (u64). That's the number, bestie β an actual u64 π
π SEE ALSO π
- Kernel file
./lib/tests/string_kunit.c strscpy_check(9)alloc_max_bench_buffer(9)fill_random_string(9)STRING_BENCH_BUF(9)
mwah π β signed off from ./lib/tests, October 2026 edition, with all the love πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms