![Lead Image © Lucy Baldwin, 123RF.com Lead Image © Lucy Baldwin, 123RF.com](/var/ezflow_site/storage/images/archive/2021/66/data-compression-as-a-cpu-benchmark/perf_dojo_123rf_9719495_lucybaldwin_resized.png/189267-1-eng-US/Perf_Dojo_123RF_9719495_LucyBaldwin_resized.png_medium.png)
Lead Image © Lucy Baldwin, 123RF.com
Data Compression as a CPU Benchmark
Cuckoo Clock
At the Dragon Propulsion Laboratory, we have long been looking for a meaningful CPU benchmark, beyond pure computational muscle displays and those architecture-bound demonstrations of number-crunching prowess usually favored by chip vendors. We have long relied on convenient load generators like stress
[1] and its modern descendant stress-ng
[2], but putting load on the system and summing its performance in a few numbers are not really the same thing: The latter helps compare systems, whereas the former helps test them. I think the search is finally over, and I am settling on data compression as a more realistic compute benchmark that does not look like a stress exercise for a vintage math coprocessor or a GPU.
Comparing systems should always involve a real workload, and comparing an ARM with an x86 system on the grounds of how fast it can compress data feels more truthful than doing so on pure disjoint CPU operations. Of course, if more information is available, it should be used by testing with the exact workload, but otherwise this choice represents a sensible default.
Enter LZMA
The Lempel-Ziv-Markov chain algorithm (LZMA) [3] is a dictionary-based, lossless compression algorithm in use with the 7-Zip archiver [4]. Demonstrating higher compression ratios than the original LZ77 [5] algorithm, it is generally expected to have comparable decompression performance. More important to the purpose, 7-Zip's author is very methodical with his performance testing, providing a reference library of results for many CPU types [6], and prebuilt binaries of
...Buy this article as PDF
(incl. VAT)