Your Compression Benchmark Is Probably Lying to You
The difference between measuring performance and understanding it.

Imagine we’ve developed two compression engines.
We give them the same file, run them on the same computer, and measure how long each takes to compress it. The first finishes in 80 milliseconds. The second takes 120.
The first engine is 50 percent faster in terms of throughput.
We’ve established a winner.
Or have we?
What if the first engine already had its dictionary initialized when we started measuring? What if the second engine was responsible for allocating its own memory? What if the first was operating on data already resident in the CPU cache while the second had to retrieve its input from main memory?
What if we measured the first engine immediately after starting the computer and the second after twenty minutes of sustained processing?
We might have measured each operation accurately.
We might also have drawn an entirely incorrect conclusion.
That’s the interesting thing about performance measurement. A number can be technically correct while the conclusion it supports is wrong.
We’ve known about this problem for a while
In 2009, Todd Mytkowicz, Amer Diwan, Matthias Hauswirth, and Peter Sweeney published a paper with a particularly appropriate title:
Producing Wrong Data Without Doing Anything Obviously Wrong!
The researchers investigated how seemingly insignificant changes to an experimental environment could affect conclusions about software performance.
They examined variables most developers wouldn’t necessarily consider relevant to their experiments, including the amount of space occupied by environment variables and the order in which object files were linked.
These changes affected the placement of instructions and data in memory. Under different experimental conditions, the researchers could reach contradictory conclusions about compiler optimizations.
The software hadn’t necessarily become better or worse.
The environment in which it was being measured had changed.
Four years later, Tomas Kalibera and Richard Jones addressed another aspect of the problem in Rigorous Benchmarking in Reasonable Time. Their work examined how software performance experiments should account for uncertainty across different levels of repetition.
Both papers are worth reading, particularly for anyone developing systems software.
They establish something that seems obvious in retrospect: performance isn’t an isolated property of an algorithm.
It’s an observed property of an implementation operating within a particular environment, processing a particular workload, under particular conditions.
Compression is an especially interesting example because its performance depends on all four.
What are we actually measuring?
Suppose we’re comparing two compression libraries.
A typical measurement might look something like this:
start = time.perf_counter()
compressed = compressor.compress(data)
elapsed = time.perf_counter() - startWe divide the number of input bytes by the elapsed time and obtain throughput.
The implementation appears straightforward.
But look at what isn’t necessarily visible.
Did compressor allocate its internal state before the timer started? Was its dictionary loaded? Was the input already in memory? Did the library allocate its own output buffer? Was the compressed stream finalized before the function returned?
Did we measure the entire operation required to produce a valid compressed representation, or only the portion exposed through a particular API?
Now consider a command-line implementation:
start = time.perf_counter()
subprocess.run(
["compressor", "input.bin"],
check=True,
)
elapsed = time.perf_counter() - startThis measurement potentially includes process creation, dynamic library loading, initialization, file access, memory allocation, compression, output finalization, and process termination.
Comparing those two measurements would tell us something.
But it wouldn’t necessarily tell us which compression algorithm is faster.
In Weissman: A Real Formula for a Fake Contest, we examined an implementation of the Weissman score that illustrates precisely this distinction. Its target compressor is measured through an external subprocess, while its gzip reference is measured around writes to an already-open compression stream.
The arithmetic is not the only thing we need to scrutinize. We also need to establish whether the measurements entering that arithmetic represent equivalent operations.
Where the stopwatch starts matters
Consider two hypothetical compression engines processing the same input.
| Operation | Engine A | Engine B |
|---|---|---|
| Initialization | 35 ms | 5 ms |
| Input preparation | 10 ms | 10 ms |
| Compression | 50 ms | 65 ms |
| Finalization | 15 ms | 5 ms |
| Total | 110 ms | 85 ms |
If we only measure the compression operation, Engine A wins.
It finishes that portion in 50 milliseconds compared with Engine B’s 65 milliseconds.
If we measure the complete operation, Engine B wins.
Neither measurement is inherently wrong.
A long-running service that initializes its compression engine once and processes thousands of requests might be more interested in the first comparison. A desktop application that creates a compression context in response to a user action might be more interested in the second.
The problem occurs when we publish one measurement without explaining what it represents (Figure 1).
Fig. 01 / Interactive
Measure the same operation.
I’d distinguish at least three kinds of compression performance.
Codec-only performance measures the compression or decompression operation with prepared inputs and explicitly defined context initialization and allocation boundaries.
Complete in-memory performance includes the work required to transform an input buffer into a complete, valid compressed representation, including relevant initialization, allocation, and finalization.
End-to-end performance measures an application-level operation, potentially including filesystem access, process creation, metadata handling, output writing, and user-visible completion.
All three are useful.
They answer different questions.
The fastest computer is sometimes the one we already used
Modern processors are remarkably good at avoiding work.
They predict branches, execute instructions speculatively, retain frequently accessed information in caches, and dynamically adjust their operating frequencies.
These mechanisms substantially improve application performance. They also complicate the process of measuring it.
Consider a compression benchmark that repeatedly processes the same one-megabyte buffer.
During the first iteration, much of that data may need to be retrieved from main memory. Instructions may need to be loaded into caches. The compression context may allocate and initialize internal structures.
By the tenth iteration, some of that work may already have been done.
The processor may have retained relevant information in its caches. Memory allocations may be reused. Internal tables may already exist. The operating system’s file cache may eliminate storage access that occurred during earlier iterations.
We are still compressing the same information.
We’re not necessarily doing the same amount of work.
Modern compression algorithms can be particularly sensitive to these conditions because they perform substantial amounts of memory access.
Dictionary-based compressors search previously encountered data for matching sequences. Statistical compressors maintain probability tables and related structures. Some implementations allocate large working buffers or perform irregular memory accesses.
Whether those structures fit into a processor’s caches can considerably affect the cost of accessing them.
A benchmark consisting entirely of small, repeatedly processed buffers might produce useful results for a cache-resident workload.
It might tell us relatively little about compressing a 20-gigabyte disk image.
Conversely, a benchmark using enormous files might underrepresent the workloads of an application primarily concerned with small documents.
Warm and cold workloads aren’t competing methodological philosophies. They’re distinct performance characteristics.
We should measure both when both are relevant.
The hardware isn’t a constant
It’s tempting to assume that running two experiments on the same computer establishes equivalent hardware conditions.
Modern processors don’t make that assumption particularly safe.
CPU frequencies change. Temperature changes. Other processes consume resources. Operating systems move threads between cores. Available memory bandwidth fluctuates depending on concurrent activity.
On a system with heterogeneous CPU cores, even the type of core executing a workload can affect its performance.
Apple Silicon provides an interesting example.
Its processors combine performance-oriented and efficiency-oriented CPU cores, unified memory, architecture-specific vector instructions, and sophisticated power management.
Two compression operations can execute on the same machine while encountering different scheduling and resource conditions.
A short benchmark might benefit from temporary high-performance operating conditions. A longer benchmark might encounter sustained thermal or power constraints.
Neither result necessarily generalizes to the other workload.
This is one reason I’m interested in measuring both burst performance and sustained performance when evaluating compression engines.
How quickly can we compress a small file immediately after receiving it?
How does the same implementation behave after processing hundreds of gigabytes?
How much additional throughput do we achieve when using multiple threads?
Does that improvement continue as thread counts increase, or do we eventually encounter memory bandwidth limitations, synchronization overhead, or other bottlenecks?
A single throughput number conceals most of these relationships.
Threads are not free
Parallelism introduces another dimension that benchmark comparisons can easily obscure.
Suppose two compressors achieve the following hypothetical results:
| Measurement | Engine A | Engine B |
|---|---|---|
| Threads | 1 | 8 |
| Compression throughput | 250 MB/s | 800 MB/s |
Engine B achieves 3.2 times the total throughput.
That’s potentially useful. If our objective is to compress something as quickly as possible using the available hardware, Engine B may be preferable.
But the comparison doesn’t establish that Engine B performs more efficiently.
We haven’t measured CPU time, actual core utilization, power consumption, memory overhead, or the opportunity cost of those additional threads.
Even dividing throughput by the configured thread count would provide only a rough indication. Eight configured threads don’t necessarily occupy eight cores continuously.
We need additional measurements.
Parallel scaling is commonly expressed relative to single-thread performance:
Here, is throughput using execution resources, and is throughput using one.
We can also express scaling efficiency:
If an implementation achieves four times its single-thread throughput using eight threads, its scaling efficiency relative to that configuration is 50 percent.
That doesn’t automatically make it a poor implementation.
Compression workloads may contain sequential dependencies. Parallel execution may require independent blocks, additional metadata, different dictionary behavior, or other changes that affect the compressed representation itself (Figure 2).
Fig. 02 / Interactive
Eight threads don’t guarantee eight times the performance.
An important part of a parallel compression benchmark is establishing whether increasing throughput changes anything else we care about.
The objective isn’t necessarily to use every available core.
It’s to use computational resources appropriately for the workload.
The problem with averaging compression ratios
Suppose we compress two files.
The first is one megabyte and compresses to one-tenth of a megabyte.
The second is 100 megabytes and compresses to 50.
| File | Original size | Compressed size | Compression ratio |
|---|---|---|---|
| A | 1 MB | 0.1 MB | 10× |
| B | 100 MB | 50 MB | 2× |
If we calculate the arithmetic mean of the compression ratios, we obtain:
We could publish an average compression ratio of 6:1.
But let’s look at what actually happened.
We started with 101 megabytes of information and produced 50.1 megabytes of compressed data.
The overall compression ratio is:
Not six.
Both calculations are mathematically correct.
They represent different quantities.
The arithmetic mean treats each file as an equally weighted observation, regardless of its size. The aggregate ratio describes how much total storage we saved across the collection.
If our objective is to understand the average per-file ratio under an equally weighted file selection, the first measurement might be useful.
If we’re trying to determine how much storage an archive engine actually saved, the second is the relevant calculation (Figure 3).
Fig. 03 / Interactive
Same files. Different conclusions.
The distinction becomes particularly important when benchmarking mixed workloads.
Imagine a corpus containing thousands of small, highly compressible text files and a few enormous, previously compressed video files.
A per-file average might suggest exceptional compression performance even when the total storage savings are relatively modest.
The same issue appears in throughput calculations.
Suppose we process files of different sizes. Averaging their individual throughput values is not generally equivalent to dividing the total number of bytes processed by the total elapsed time.
A measurement needs to establish the question it answers before we can interpret its aggregation.
A smaller payload doesn’t necessarily mean a smaller archive
Compression algorithms are frequently evaluated using the size of their encoded payloads.
That’s appropriate when we’re specifically studying codec efficiency.
An archive engine, however, needs to produce something that can actually be opened, inspected, and decoded.
That may require additional information.
Consider two hypothetical archive implementations:
| Component | Engine A | Engine B |
|---|---|---|
| Original input | 100 MB | 100 MB |
| Compressed payload | 20 MB | 23 MB |
| Dictionary | 8 MB | 0 MB |
| Metadata and indexes | 2 MB | 1 MB |
| Complete archive | 30 MB | 24 MB |
If we compare only the compressed payloads, Engine A appears superior.
Its payload is three megabytes smaller.
If we compare complete, independently decodable archives, Engine B is superior.
Its output occupies six megabytes less storage (Figure 4).
Fig. 04 / Interactive
Where did those additional bytes go?
Again, both comparisons are legitimate under different conditions.
If Engine A’s dictionary is already available to the decoder and reused across thousands of files, the marginal cost of compressing another file may be considerably different from the cost of producing a self-contained archive.
An archive might also contain additional indexes that significantly improve random-access performance.
A larger representation could deliver a better application experience because it allows us to retrieve specific entries without decoding unrelated information.
This is particularly relevant to Peel.
An archive isn’t simply a compressed stream. It’s an object someone might want to browse, search, inspect, and partially extract.
The relationship between compressed size and application usefulness isn’t always straightforward.
I’d want a benchmark to report payload size, complete representation size, external dependencies, and the functionality those additional bytes provide.
Otherwise, an optimization that removes useful indexing information could appear to improve compression performance while making the actual application substantially less useful.
The best run isn’t necessarily a useful result
Suppose we run two compression engines ten times.
Engine A produces these hypothetical elapsed times:
80, 81, 79, 82, 80,
81, 79, 82, 80, 81 ms
Engine B produces:
65, 110, 95, 125, 88,
105, 115, 92, 100, 120 ms
The fastest observed run belongs to Engine B.
It finishes in 65 milliseconds.
If we report only the best result, Engine B appears substantially faster.
But Engine A’s median is 80.5 milliseconds, while Engine B’s median is 102.5 milliseconds.
Engine A also exhibits substantially less variation.
Which implementation would we prefer for an interactive application?
Perhaps Engine B’s unusually fast run reveals a useful performance capability that we should investigate. It might indicate favorable scheduling, an optimization opportunity, or some other condition we can reproduce.
But reporting that observation as representative of its normal behavior would be misleading (Figure 5).
Fig. 05 / Interactive
Which engine is faster?
The choice of statistic matters.
The minimum tells us the fastest observed operation.
The median describes the middle of our observations.
The mean reflects total observed elapsed time divided by the number of operations.
Upper percentiles can help characterize slow operations, provided we have enough observations to estimate them meaningfully.
Measures of dispersion tell us how consistent the system is.
None of these measurements should automatically replace the others.
A particularly frustrating aspect of performance reporting is how frequently relatively small differences are presented with extraordinary precision.
An implementation might be described as 2.37 percent faster despite ordinary variation between runs exceeding the observed difference.
The decimal places don’t establish confidence.
Our experimental design does.
Run it again. Differently.
Repeated measurements are necessary, but repetition alone doesn’t eliminate systematic bias.
Imagine we benchmark Engine A one hundred times, followed by Engine B one hundred times.
The computer becomes progressively warmer throughout the experiment. Background processes change. CPU scheduling changes. Memory allocations and caches evolve.
If those changes consistently affect the second half of the experiment, we may measure a difference attributable to execution order rather than to the compressors themselves.
Running the experiment another hundred times in the same order may reproduce the same bias.
A useful approach is to alternate or randomize execution order within controlled groups of observations.
For example:
Trial group 1: A, B
Trial group 2: B, A
Trial group 3: B, A
Trial group 4: A, B
Trial group 5: B, A
This doesn’t guarantee that every environmental influence disappears.
It does make it more difficult for a consistent ordering effect to benefit the same implementation in every trial.
Google’s open-source benchmarking library explicitly supports randomized interleaving of benchmark repetitions, alongside configurable warm-up periods and repeated measurements.
These are useful mechanisms because they acknowledge that the system being measured is not operating in isolation.
Where practical, I’d also separate sources of variation.
Repeated operations within one process can tell us something about steady-state behavior. Repeated process invocations can expose initialization and operating-system effects. Repeated builds can reveal performance sensitivity to compiler behavior or code layout.
The appropriate number of repetitions depends on the variability of the workload and the precision we need.
There is no universally correct number of benchmark runs.
The dataset is part of the algorithm’s performance
In The Impossible Compressor, we established why no lossless compression algorithm can make every possible input smaller.
Compression works by exploiting particular structures in information.
That means the selection of input data is fundamental to every compression benchmark.
Consider an engine optimized for repetitive structured text.
It might perform exceptionally well on application logs, JSON documents, XML, or generated source code.
A different engine might be more effective on executable binaries, large numerical datasets, or mixed filesystem images.
A benchmark constructed exclusively from highly repetitive text could make the first engine appear universally superior.
It isn’t.
It’s superior on the workload we’ve selected, according to the measurements we’ve taken.
Traditional compression corpora provide an important historical reference. The Calgary, Canterbury, and Silesia corpora make it possible to compare new results with existing research and implementations.
But contemporary applications encounter information that those corpora cannot comprehensively represent.
An archive engine operating today might encounter:
- Source code repositories and application bundles.
- Modern executable formats and WebAssembly.
- Machine learning weights and numerical tensors.
- Firmware images and virtual disk images.
- RAW photographs and previously compressed media.
- Database exports and structured records.
- Encrypted files and high-entropy binary data.
- Millions of individually small filesystem entries.
Even the way we combine those files changes the workload.
Compressing every file individually isn’t equivalent to compressing the entire collection as a single stream.
One arrangement might permit the compressor to exploit relationships across file boundaries. Another might preserve independent extraction and limit damage propagation.
A benchmark should document the organization of its input, not merely provide a list of filenames.
Corpus versions and cryptographic hashes matter for the same reason.
If someone modifies the dataset without recording the change, we may no longer be comparing equivalent experiments.
There is no such thing as a neutral compression level
Another complication appears when we decide which settings to compare.
Many compression libraries expose configuration parameters intended to trade compression efficiency against processing time and memory usage.
These are frequently represented as numbered compression levels.
Unfortunately, level six in one library doesn’t necessarily mean the same thing as level six in another.
The numbers describe positions within an implementation’s own configuration space.
They don’t establish equivalent computational budgets, output sizes, or optimization objectives.
Comparing the default configuration of each compressor is useful if we’re trying to understand what users experience without changing settings.
Comparing the highest compression level of each compressor might be useful when studying maximum available compression.
Neither necessarily establishes which algorithm provides a better overall trade-off.
A more informative approach is to evaluate multiple configurations and inspect the relationships between their results.
We might compare:
- Compression ratios at similar encoding throughput.
- Encoding throughput at similar compressed sizes.
- Decoding performance at similar storage costs.
- Memory requirements under equivalent application constraints.
- Complete performance frontiers across available configurations.
The configurations should include the features and guarantees required by the intended workload.
An implementation that achieves high throughput by omitting checksums shouldn’t necessarily be compared directly with one performing integrity checks without accounting for the distinction.
Fairness doesn’t mean forcing every implementation to use identical internal mechanisms.
It means establishing equivalent external requirements and making configuration differences visible.
Before we measure speed, does it work?
There is an exceptionally simple way to build the fastest compression algorithm in the world.
Accept an input file.
Return an empty output.
The compression ratio is effectively unbounded, and the operation requires almost no processing time.
Of course, we can’t reconstruct the original information.
It’s useless as a lossless compression algorithm.
The example is absurd, but it illustrates why correctness needs to precede performance.
A benchmark that measures compressed output size and execution time without verifying successful reconstruction has omitted a fundamental requirement.
At a minimum, a lossless compression benchmark should verify:
Where represents compression, represents decompression, and is the original input.
A successful process exit isn’t sufficient evidence.
A decoder might return incomplete output. An implementation might mishandle unusual metadata, truncate data, or silently introduce corruption.
For archive formats, correctness may also involve preserving filenames, directory structure, permissions, timestamps, and other supported metadata, depending on what the benchmark claims to evaluate.
Security introduces additional requirements.
An archive engine should not be rewarded for ignoring filesystem containment, accepting malformed structures without validation, or allowing unbounded resource consumption.
These shouldn’t simply become low-weight penalties within a composite performance score.
Some properties are prerequisites.
Performance is worth measuring only after we’ve established that the implementation satisfies the requirements of the operation.
What an archive benchmark should measure
While developing Peel and Rind, I’ve become increasingly interested in the distinction between compression performance and archive performance.
They’re related, but they aren’t interchangeable.
Consider a user opening an archive containing thousands of photographs.
Their first interaction might be viewing the list of files. They might search for a particular photograph, preview it, and close the archive without extracting anything else.
A traditional codec benchmark doesn’t necessarily capture that experience.
The application might spend more time locating metadata, initializing an archive reader, resolving nested structures, or accessing specific compressed blocks than it spends decoding the photograph itself.
I would want to understand at least four separate aspects of that operation.
| Measurement | Question |
|---|---|
| Time to open | How quickly can the archive become usable? |
| Time to enumerate | How quickly can we inspect its contents? |
| Time to first preview | How quickly can we access the requested entry? |
| Partial extraction cost | How much additional data must we process to retrieve it? |
We could extend this to memory consumption, temporary storage requirements, cancellation latency, repeated access, and error recovery.
These measurements describe the application experience in ways that aggregate decompression throughput cannot.
An archive engine might achieve lower sequential decompression throughput while offering significantly faster access to individual entries.
Whether that’s an improvement depends on what we’re building.
For Peel, the objective isn’t simply to decompress information as rapidly as possible.
It’s to make compressed information useful with as little unnecessary work as possible.
Building an experiment worth reproducing
Suppose we want to evaluate how input size and execution conditions affect compression performance.
We can establish a small experiment using a fixed dataset and a single compression implementation, varying only the characteristics of the measurement.
The following example uses Python’s gzip implementation. It compares compression of an entire buffer with compression of independently framed chunks.
Both paths produce valid gzip representations, and both include compression context initialization and output finalization within the timed operation.
The experiment uses randomized execution order, repeated measurements, a monotonic performance clock, and exact round-trip verification.
import csv
import gzip
import hashlib
import platform
import random
import sys
import time
import zlib
REPETITIONS = 15
CHUNK_SIZE = 64 * 1024
LEVEL = 6
SIZES = [
64 * 1024,
1024 * 1024,
8 * 1024 * 1024,
]
rng = random.Random(1948)
def whole_buffer(data):
return gzip.compress(
data,
compresslevel=LEVEL,
mtime=0,
)
def independent_chunks(data):
return b"".join(
gzip.compress(
data[offset:offset + CHUNK_SIZE],
compresslevel=LEVEL,
mtime=0,
)
for offset in range(
0, len(data), CHUNK_SIZE
)
)
operations = {
"whole-buffer": whole_buffer,
"independent-chunks": independent_chunks,
}
print(
f"Python: {platform.python_version()}",
file=sys.stderr,
)
print(
f"zlib: {zlib.ZLIB_RUNTIME_VERSION}",
file=sys.stderr,
)
print(
f"Platform: {platform.platform()}",
file=sys.stderr,
)
writer = csv.writer(sys.stdout)
writer.writerow([
"input_bytes",
"input_sha256",
"method",
"trial",
"order",
"elapsed_ns",
"compressed_bytes",
])
for size in SIZES:
pattern = b"Compression explores structure.\n"
data = (
pattern
* ((size + len(pattern) - 1) // len(pattern))
)[:size]
digest = hashlib.sha256(data).hexdigest()
# Untimed warm-up for each operation.
for operation in operations.values():
result = operation(data)
if gzip.decompress(result) != data:
raise RuntimeError("Warm-up verification failed")
for trial in range(REPETITIONS):
order = list(operations)
rng.shuffle(order)
for position, name in enumerate(order):
operation = operations[name]
start = time.perf_counter_ns()
compressed = operation(data)
elapsed = time.perf_counter_ns() - start
# Correctness is checked outside the timer.
if gzip.decompress(compressed) != data:
raise RuntimeError("Round-trip verification failed")
writer.writerow([
size,
digest,
name,
trial,
position,
elapsed,
len(compressed),
])The resulting observations would allow us to calculate throughput, compression ratio, elapsed-time distributions, and the overhead associated with independently framing multiple chunks.
There is an important distinction here.
This experiment doesn’t isolate the computational cost of chunk size alone. Independently compressing chunks changes the number of gzip members, the availability of cross-chunk compression context, and the amount of framing overhead.
Those are intentional differences between the two strategies.
Nor does the experiment measure filesystem access, cold-cache behavior, multithreading, or archive browsing. It measures a particular in-memory workload.
That limitation is part of the experimental specification.
The program is provided as a proposed reproducible experiment. It has not been executed for this article, and no resulting performance figures are claimed.
A benchmark should retain more information than it publishes
The output of a benchmark is frequently reduced to a table of final scores.
That’s convenient for readers but problematic for researchers.
If we’ve discarded the individual measurements, we can’t necessarily investigate anomalous results, recalculate aggregate statistics, evaluate alternative scoring methods, or determine whether an apparent improvement falls within ordinary variation.
I’d prefer to treat the raw observations as the primary research artifact.
Each observation should identify the implementation, version, build configuration, input, hardware environment, execution conditions, and measured quantities.
Derived scores can then be calculated from those observations.
This would allow us to revisit historical benchmarks as our understanding of compression performance evolves.
Perhaps we initially measure compression ratio, encoding throughput, decoding throughput, and peak memory consumption.
Later, we develop a scoring profile that places substantially greater importance on decoding performance.
If we’ve retained the underlying measurements, we can calculate that score without necessarily repeating the original experiments.
We could apply different aggregation methods, examine variability, or compare configurations against updated optimization criteria.
We would still need new measurements when the necessary information wasn’t originally collected.
But the distinction between observing performance and interpreting performance gives us considerably more flexibility.
It also makes our conclusions easier to challenge.
And that’s something a good benchmark should actively encourage.
What I’d want from an independent benchmark
The more I work through these issues, the more convinced I become that a compression engine shouldn’t be responsible for defining the benchmark that establishes its own superiority.
There is an inherent tension there.
We’re developing software. We want it to perform well. We want to demonstrate the benefits of the decisions we’ve made.
Without an independent measurement specification, it’s remarkably easy to select workloads, configurations, or scoring methods that favor our own implementation without explicitly intending to do so.
I’d rather establish a framework that can expose the weaknesses of Rind as effectively as its strengths.
An independent compression benchmark should have a documented execution model, clearly defined timing boundaries, versioned corpora, explicit codec configurations, complete byte accounting, correctness validation, and sufficiently detailed statistical reporting.
It should distinguish raw codec measurements from complete archive operations.
It should allow different hardware and operating environments to be represented without pretending they’re equivalent.
It should retain enough information to reproduce its conclusions.
And it should allow competing implementations to participate without depending on Rind or Peel (Figure 6).
Fig. 06
From measurement to conclusion.
- CorpusHashed inputsCodecsPinned buildsEnvironmentHardware and OS
- Benchmark executionTiming · isolation · repetition
- Correctness validationExact reconstruction · constraints
- Raw observationsPreserved results · provenance
- Statistical interpretationAggregation · uncertainty
- Published scoresProfiles · comparisons · frontiers
The most interesting outcome might not be discovering where our compression technology performs best.
It might be discovering where we’ve been measuring the wrong thing entirely.
The shadow of the object
Consider two identical objects sitting beneath different sources of light.
One casts a short shadow. The other casts a long one.
If we measure the shadows, we can accurately establish that one is longer than the other.
If we use that observation to conclude that one object is larger than the other, we have misunderstood the relationship between the object and the conditions under which we observed it.
Performance benchmarks present a similar problem.
The result is influenced by the software, the hardware, the workload, the experimental environment, and the measurement procedure.
Our job isn’t merely to produce an accurate number.
It’s to understand what that number represents.
That’s why a benchmark deserves the same engineering discipline as the technology it measures.
The compression algorithm might be perfectly sound.
The instrument might be the thing that needs improving.
References and further reading
- Todd Mytkowicz, Amer Diwan, Matthias Hauswirth, and Peter F. Sweeney. Producing Wrong Data Without Doing Anything Obviously Wrong! ASPLOS, 2009.
- Tomas Kalibera and Richard Jones. Rigorous Benchmarking in Reasonable Time. ISMM, 2013.
- Google. Benchmark User Guide.
- Google. Random Interleaving of Benchmark Repetitions.
- lzbench — Open-source compression benchmarking.
- Zstandard — Fast real-time compression algorithm.
- Python documentation — Performance clocks.
- RFC 1952 — GZIP File Format Specification.
Research disclosure: Numerical examples are hypothetical and are used to demonstrate the consequences of different measurement and aggregation methods. The cited performance-engineering research provides historical context. The accompanying Python experiment has not been executed for this article. No empirical performance claims are made about Rind, Peel, or competing compression engines.
