TurboBench
github.com/powturbo/turbobench- Category
- Developer Tools
- Rank
- No. 1114Tools index
- Type
- TOOL
- Use case
- Software Testing & Quality
- GitHub
- 376 stars
- Latest release
- v2026.10.27
- Date
About
TurboBench is a benchmarking harness that compares dozens of data compression libraries and codecs (including LZ4, Brotli, Bzip2, LZMA, and many others) bundled as git submodules, letting users measure and compare their compression ratio and speed against each other.
What it does
A single C program that links many codec libraries into one binary and times each of them on your own files, entirely in memory. You pick codecs and levels, or a named preset group such as FAST, MAX, BWT or WEB, and it reports output size, encode and decode throughput, and a rank. Results accumulate in a result file that later runs merge into, and can be printed as text, HTML, Markdown or CSV, with SVG charts and plots that convert speed into transfer time over links from 2G up to RAM.
Why it's ranked here
Few open tools put this many codecs behind one command line. The build pulls each codec in as a submodule, enables it only when that source is present, and CI compiles the result with GCC and Clang on x86, ARM, RISC-V, macOS and Windows before benchmarking a standard corpus. That makes it a practical way to settle a codec choice on your own data rather than trusting a vendor chart. The case is weakened by the marketing: the README calls itself the only benchmark of its kind, and the comparison table against lzbench is written by the author.
What's good
Every decoded buffer can be compared byte for byte against the input, so a codec that silently corrupts data shows up as an error rather than a fast number. The decode check can also abort the process, which the source notes is for fuzzing. Codec parameters pass through on the command line, so you can test a tuned LZMA dictionary or match finder, not only preset levels. Preset groups are plain lines in a config file you can edit. Each nightly result table marks the speed and ratio frontier in bold, which is the useful reading of a benchmark.
Tradeoffs
Heap peak tracking works by replacing the system allocator on Unix builds. On Windows and static builds the heap peak functions are compiled to return zero, which undercuts the README promise of peak memory reporting there. The author's own codec, LzTurbo, sits at the top of the codec list and in the default groups, but its plugin header lives outside the repository, so public builds cannot reproduce those rows. Building everything needs CMake, and some codecs need Cargo or Zig; CI itself turns several off. All compiler warnings are suppressed. The codec table flags Iguana as not reliable and mzip as too slow.
How to use it well
Use it when you are choosing a codec for a specific data shape, such as logs, columnar numbers or web assets, and want numbers from your own hardware. Clone with submodules, build, list compiled codecs first, then run a preset group on a representative sample and rerun with tuned parameters for the two or three finalists. Treat memory figures as Unix only. Keep a separate result file per experiment set so merges stay comparable. It does not cover streaming, multithreaded throughput tuning in production, or compatibility between versions of a format.
Technical notes+
turbobench.c (GPL v2 header) interposes malloc, calloc, realloc and free through dlsym(RTLD_NEXT, ...) and counts malloc_usable_size, with a 1 MB static bootstrap heap before the real allocator resolves. The guard reads #if defined(NMEMSIZE) || defined(_WIN32) then #elif defined(_WIN32), so the Windows PrivateUsage sampler thread is unreachable and mempeak() is 0 on Windows; makefile sets NMEMSIZE for STATIC builds. Stack peak uses stack painting with STACK_MAGIC on Windows and Linux. memcheck() exits or aborts on mismatch depending on the check level. plugin.cc defines one enum slot per codec with each _CODEC flag defaulting to 0; the makefile sets the flag only when the submodule directory exists. The LzTurbo plugin header is included from a sibling lz directory outside the tree. plugin.h exposes codini/codcomp/coddecomp/codver as the plugin interface. turbobench.ini holds the named groups. makefile compiles with -w -fpermissive, skips aceapex and c-blosc2 on Windows and AOCL off x86_64. .github/workflows/build.yml builds with BLOSC=0 OPENZL=0 PIVCO=0 RUST=0 and runs the Silesia corpus; the RISC-V Silesia step is commented out.
Observed
- License
- GPL v2 (header in turbobench.c)
- Language
- C and C++ (turbobench.c, plugin.cc)
- Interface
- Command-line executable
- Install
- Recursive git clone then make, or a prebuilt release binary
- Build dependencies
- make and CMake; Cargo and Zig for some optional codecs (makefile)
- CI platforms
- Linux x86_64 and ARM (GCC, Clang), RISC-V, macOS, Windows MSYS2 (.github/workflows/build.yml)
- Codec inclusion
- Each codec compiled only when its submodule directory is present (makefile)
- Heap peak memory
- Compiled to zero on Windows and static builds (turbobench.c)
- Preset groups
- FAST, MAX, OPTIMAL, BWT, WEB and others defined in turbobench.ini
- Output formats
- Text, HTML, Markdown, CSV, SVG charts
Read from README.md, makefile, turbobench.c, plugin.cc, plugin.h, turbobench.ini, benchmark.md, .github/workflows/build.yml.
Tags
Media
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.