Files
vlibc/benchmarks/README.md
T
huntedbytheirs 180c1107b6 Add vlibc scaffold, build system, and documentation
Establish the repository layout per Vox guidelines (layouts/C.md,
building/C.md): Autotools build (GCC-only, C23), five compatibility
profiles (--enable-onlyposix/--enable-muslmimic/--enable-muslext/
--enable-spoof, default vlibc), alongside/overwrite install methods,
vlibc-gcc/vlibc-clang drivers, static-linking requirement (except
spoof), benchmark harness, and tooling (.clang-format/.clang-tidy/
.clangd + compile_commands.json).
2026-08-31 17:06:01 -04:00

1.0 KiB

Benchmarking

Every vlibc component is benchmarked against the software it replaces, per musts/BENCHMARKING.md. A component that is slower or worse at its task than the software it replaces is considered failing.

Layout

  • Each benchmark harness is a standalone C program in this directory, named bench_<component>.c.
  • bench_vlibc.c is the skeleton that per-component benchmarks build on.

Running

./autogen.sh                  # configure (default: link against vlibc)
make bench                    # build and run the harnesses

# Reference comparison against the libc vlibc replaces:
./autogen.sh --with-libc=glibc
make bench

# musl reference (requires musl-gcc):
./autogen.sh --with-libc=musl
make bench

Adding a benchmark

  1. Add bench_<component>.c here and list it in benchmarks/Makefile.am.
  2. Measure the component against the equivalent glibc (and musl) call.
  3. Report wall-clock time, throughput, and any binary-size difference.
  4. If vlibc is slower, the benchmark fails — fix the implementation.