Benchmarks
Every measurement, the machine behind it, and the cases Arca loses.
Last updated
These numbers come from specific machines and should not be read as a general advantage. Each one comes with its method, including the cases where Arca loses.
Measure your own machine
arca bench --codecs measures every codec Arca writes on the machine it runs on, much as 7-Zip’s Tools → Benchmark does. It needs no files and touches no disk: the data is generated in memory. The desktop app runs the same benchmark from Benchmark… in the More menu; see the desktop app.
arca bench --codecsarca bench --codecs --threads 8 --seconds 3 --size 32arca bench --codecs --jsonThis page publishes no figures from it. Its output always ends with the command that reproduces it; keep that line next to any number you share.
How it measures:
- The data.
--sizeMiB (16 by default, and at least 1 MiB per thread) generated from a fixed seed, so every machine and every run gets the same bytes. Of every four 64 KiB stretches, three are prose-like text, made from a fixed vocabulary with common words far more frequent than rare ones, and the fourth is random bytes. - The codecs. Every codec runs at level 6 (normal), the default of
arca create, through the same writers and readers Arca uses: Store, Deflate and Zstandard as ZIP entries, LZMA2 as one.xzstream per chunk, bzip2 as one.bz2stream per chunk, and RAR5 as one RAR archive held in memory. A codec the build lacks is listed as not in this build. - The threads. The data is cut into 1 MiB chunks, each compressed on its own as a ZIP entry would be. One thread takes one chunk at a time;
--threads N(every core by default) takes N at once. Both columns do exactly the same work, so only the parallelism differs. LZMA2 uses no more threads than fit in the 2 GiB thatarca creategives a.tar.xz, and the table says so when that is fewer.arca createwrites a.bz2on a single thread, so the bzip2 column for N threads shows what the processor does with independent chunks, not how fastarca create x.bz2is. - The timing. Each measurement repeats its runs until
--secondshave passed (1 by default; at least one run is always made) and reports the median. Speeds are MB/s of uncompressed data in both directions, with 1 MB = 10^6 bytes. The ratio is the compressed size over the original size, archive headers included. - The check. Every decompressed chunk is compared with the original, outside the timed part. A difference stops the benchmark with an error.
The rating
The rating is the geometric mean of six speeds: compression and decompression of Deflate, LZMA2 and bzip2. That is, with c for compression and d for decompression, in MB/s:
rating = (c_Deflate × d_Deflate × c_LZMA2 × d_LZMA2 × c_bzip2 × d_bzip2) ^ (1/6)It is worked out once for one thread and once for --threads. Those three codecs are used because every build has them: Zstandard is missing from builds without the native codecs, RAR5 from builds without RAR, and Store only measures memory bandwidth. A geometric mean keeps a fast codec from drowning out a slow one: doubling any one of the six speeds raises the rating by the same 12%, whichever it is.
Two ratings compare only when they come from the same Arca version, the same kind of build and the same options. The first line of the output says which build it is: native codecs uses libdeflate for Deflate, pure Rust codecs uses zlib-rs, and the two do not run at the same speed. The multithreaded rating also depends on --threads.
Memory and stopping
The benchmark holds the data, one compressed copy of it and two chunks per thread, about twice --size plus 2 MiB per thread. The output prints that figure. Codec state comes on top, and the largest is the LZMA2 encoders: the 94 MiB xz(1) documents for level 6, on at most as many threads as fit in 2 GiB, which the output also prints as an upper bound.
Ctrl+C stops between runs, so the wait is at most one run, the longest being one chunk of LZMA2 on one thread. Arca then prints the table with what it had measured, says it stopped before the end, and exits with status 130. In a build without RAR the handler is not installed and Ctrl+C ends the process at once, which loses nothing because the benchmark writes nothing.
Requirements
Ryzen 9 5900X, Linux. Everything in this section and the next is reproduced by one script, which downloads the Silesia corpus, pins it by hash and prints the machine and tool versions it ran on:
cargo build --releasenix-shell -p hyperfine zip unzip _7zz --run 'bash bench.sh'hyperfine -N --warmup 20 'arca list tiny.zip' 'unzip -l tiny.zip' '7zz l tiny.zip'hyperfine -N --warmup 5 'arca list list-6000.zip' 'unzip -l list-6000.zip' '7zz l list-6000.zip'hyperfine -N --prepare 'rm -f out.zip' \ 'taskset -c 0,1 arca create out.zip corpus -c deflate -j 1' \ 'taskset -c 0,1 arca create out.zip corpus -c deflate -j 2'Compression
The Silesia corpus, 211.9 MB cut into 120 equal files, pinned to two physical cores.
hyperfine -N --prepare 'rm -f out.zip' \ 'taskset -c 0,1 arca create out.zip corpus -c zstd' \ 'taskset -c 0,1 arca create out.zip corpus -c deflate' \ 'taskset -c 0,1 zip -qr -6 out.zip corpus' \ 'taskset -c 0,1 7zz a -tzip -mx5 out.zip corpus'With Zstandard, Arca was 13.2× faster than zip and 18.1× faster than 7-Zip; 7-Zip still wrote the smallest archive, 1.6% below Arca’s. With Deflate, Arca was 5.7× faster than zip and its archive 1.1% smaller.
Deflate against deflate on Windows 11
16 threads, best of 3.
arca create c1.zip src7z a -tzip -mx5 c2.zip srcWith large files Arca compressed 5.7× faster at the cost of 3.7% in size; with many small files 7-Zip was somewhat ahead at the same size. The winner depends on the corpus. Those figures predate the small-file work in the next section.
Many small files on Windows 11
Ryzen 7 3700X (8 cores, 16 threads), Windows 11, Microsoft Defender real-time protection on, a DRAM-less SATA SSD (Kingston A400), warm cache. Other builds were running on the machine at the same time, so wall times move: each row is the median of the runs in A B B A order with the range in brackets, and the process CPU time (user plus kernel) is given as well because it moves less. Before is Arca 0.10.0 at commit 4b1d67b.
The corpus is 50,000 files of 0 to 16,384 bytes in 100 folders, 410,069,593 bytes in all, three parts prose-like text to one part random bytes, generated from a fixed seed:
cargo run --release -p arca-bench --example small_files -- C:/b/smallpowershell -File benchmarks\time.ps1 -Exes arca-0.10.0.exe,arca.exe ` -ArgLine "create C:\b\out.zip C:\b\small" -Runs 16 -Clean C:\b\out.zippowershell -File benchmarks\time.ps1 -Exes arca-0.10.0.exe,arca.exe ` -ArgLine "create C:\b\out.zip C:\b\small -j 1" -Runs 6 -Clean C:\b\out.zipWhere the time went, and what changed:
- The walk. Every file was asked for its metadata twice before it was read, and on Windows each ask opens and closes the file, all on one thread. The size and time now come from the folder listing, which already has them.
- The writer. Each entry’s local header was patched after its data, two seeks back and one forward, and every seek flushed the output buffer. An entry compressed in memory now gets its header complete, without the 20-byte Zip64 field it never needs; that field is what makes the archive 1,000,000 bytes smaller.
- The compressor. A fresh libdeflate or Zstandard compressor per file cost more than compressing a small file. Each thread now keeps its own.
- The order. Every file was compressed before the first one was written. Now files are written as soon as they are next in line, while later ones are still being compressed. At most 32 MiB of file data per thread is in flight, as before, and with small files the writer keeps up, so far less is held.
arca create C:\b\small.zip C:\b\smallpowershell -File benchmarks\time.ps1 -Exes arca-0.10.0.exe,arca.exe ` -ArgLine "extract C:\b\small.zip -o C:\b\out" -Runs 6 -Clean C:\b\outExtracting is the file system’s time, not Arca’s: of 33 to 35 seconds of CPU, about 30 are spent in the kernel creating 50,000 files, and the two ranges overlap. The command line already read through one buffered reader per thread; it now creates each new file in one call instead of checking for it first, and a write that fails no longer leaves a short file behind. There is no speed claim here.
The desktop app opened the archive again for every entry it extracted, behind a fresh 256 KiB buffer that the seek to the entry then discarded. Counted on one thread with the example that models it, that is 50,001 opens and 26,218,015,557 bytes read for this 251 MB archive, against 2 opens and 251,341,637 bytes now. The window itself was not timed.
cargo run --release -p arca-zip --example read_amplification -- C:/b/small.zip baselinecargo run --release -p arca-zip --example read_amplification -- C:/b/small.zip bothDeflate size against WinRAR’s ZIP
Sizes do not depend on the machine. 7-Zip was not installed on the machine, so WinRAR 7.23, which also writes ZIP with Deflate, stands in for it. Archive bytes, everything included:
cargo run --release -p arca-bench --example small_files -- C:/b/smallcargo run --release -p arca-bench --example small_files -- C:/b/text 16 33554432 textmkdir C:/b/src && git archive 4b1d67b | tar -x -C C:/b/srcarca create C:/b/out.zip C:/b/small -l 6Start-Process -Wait "C:\Program Files\WinRAR\WinRAR.exe" ` -ArgumentList "a -afzip -m5 -ibck -y -r -ep1 C:\b\out.zip C:\b\small\*"What each level costs, on the same machine and under the same load, 3 runs each, 16 threads:
powershell -File benchmarks\time.ps1 -Exes arca.exe ` -ArgLine "create C:\b\out.zip C:\b\text -l 8" -Runs 3 -Clean C:\b\out.zipThe default is smaller than WinRAR’s best on small files and on source code, and 0.5% larger on large text. Level 8 is the first of libdeflate’s near-optimal parsers: 4.7% smaller than WinRAR’s best on large text and 1.6% smaller on small files, for two and a half to five times the CPU of the default. Level 9 adds very little over 8. The mapping from Arca’s levels to libdeflate’s is unchanged. For the 16-file corpus in the table further up, 7-Zip -mx5 was 3.5% below Arca’s default; level 8 is 5.2% below the default on the large text here, so it should close that gap, but that has not been measured against 7-Zip.
Parallel extraction
Windows 11, 16 threads, 287 MB in 16 text files, best of 3, deleting the output before each pass.
arca create big.zip bigarca extract big.zip -o out -j 1arca extract big.zip -o out7z x -o"out" big7z.zipLZMA and LZMA2: .xz, .tar.xz and .7z
Windows 11, Ryzen 7 3700X (8 cores, 16 threads), against xz 5.8.1 from Git for Windows; 7-Zip was not installed. Other builds shared the machine while these ran, so every row is the median of interleaved runs with its range in brackets, and both the wall time and the process’s own CPU time are given. “Before” is Arca at commit 4b1d67b, “after” the same source with the LZMA work on roadmap/lzma-speed; both say arca 0.10.0.
The corpus is 80 MiB that every machine regenerates byte for byte: 24 MiB each of prose, Rust-like source and x86-like machine code, and 8 MiB of random bytes.
cargo build --releasecargo run --release -p arca-bench --example lzma_corpus -- corpustar -cf corpus.tar corpusxz -1 -T0 -kc corpus.tar > t1.tar.xz # 27 blocksxz -6 -T0 -kc corpus.tar > t6.tar.xz # 4 blocksxz -6 -T1 -kc corpus.tar > s6.tar.xz # 1 blockExtracting a .tar.xz
Wall time with its range, then CPU time, median of 5. Arca also reads the TAR and writes the four files; xz writes the one .tar.
arca extract t1.tar.xz -o outxz -dkf -T1 t1.tar.xzxz -dkf -T0 t1.tar.xzA .xz written on several threads is a series of independent blocks, and Arca now decodes one block per core, as xz -T0 does. A file of one block still decodes on one thread; there the faster XZ checksums cut Arca’s time by 14%, but it still takes 1.13 s of CPU against xz’s 0.81 s, part of it reading the TAR and writing the files: its decoder, in safe Rust, is slower than liblzma’s. With many small blocks Arca comes closest to xz -T0; with four, the largest block sets the pace for both tools.
Creating a .tar.xz
Median of 3. Arca at -l 1 and -l 6 against xz -1 and xz -6 on the same files; the sizes are within 0.03% of each other at every level.
arca create out.tar.xz corpus -l 6arca create out.tar.xz corpus -l 6 -j 1xz -6 -T0 -kf corpus.tarxz -6 -T1 -kf corpus.tarThe encoder did not change: the two Arca rows at each level differ by no more than their ranges, and on one thread Arca takes 17% more CPU than xz at level 6. At that level most of the time goes into the binary-tree match finder walking memory the cache does not hold, the same work xz does. Both cut the input into blocks of three dictionaries, 24 MiB at level 6, so 80 MiB gives only four blocks to run side by side, and the block of prose, the slowest, sets the wall time.
7z, level by level
Median of 3 for creation, 5 for extraction, of archives made by Arca from the same corpus directory. The sizes did not change by a byte.
arca create out.7z corpus -l 6arca extract out.7z -o outExtraction now decodes the LZMA2 data on several threads wherever the stream resets its dictionary, as multithreaded writers do every few dictionaries; a block of one run, as level 9 writes, still decodes on one thread. CPU time for extraction stayed between 1.2 and 1.6 s before and after. Creation at level 1 lost 9% of wall time, a gap wider than the ranges, probably because the multithreaded LZMA2 writer of lzma-rust2 0.22.0, which .7z now shares with .xz, keeps at most one chunk queued beyond its threads, where 0.21.0 read ahead without a bound.
Against NanaZip, on an archive big enough to hurt
A 3.13 GB .zip holding 1,513 files that unpack to 6.28 GB, all Deflate, with 13 entries over 100 MB. Windows 11, 16 cores, NanaZip 7.0.1832, and a DRAM-less SATA SSD (Kingston A400).
Decompression alone
Both tools read every entry, check every CRC and write nothing, on one core each.
arca test big.zipNanaZipC t big.zipThe whole job
Writing all 6.28 GB, run in the order A B B A so the disk’s decline can’t favour either side.
arca extract big.zip -o outNanaZipC x -y -o"out" big.zipThe disk sustained 327 MB/s before the four runs and 90 MB/s after them. Arca ran on both the freshest and the most worn disk, and its worst run still beat NanaZip’s best.
RAR 5 against WinRAR
Arca writes RAR 5 with its own compressor, a patched copy of rars (see arca-rar/vendor/PATCHES.md). These figures compare it with WinRAR's console Rar.exe 7.23 at the level each Arca level stands in for: Arca -l 1, 3, 6, 7 and 9 against -m1 to -m5.
AMD Ryzen 7 3700X (8 cores, 16 threads), 32 GB, Windows 11. The machine was busy: other builds ran throughout, and the processor load sampled before each run was mostly 60–100%. Wall times swing by a factor of two or more from run to run, so the tables lead with the CPU time of the whole process (all its threads) and the size, which load moves far less. Each figure is the median of 3 runs; the CSV the script writes keeps every run and its load.
The corpus is generated, so anyone can rebuild the same bytes, plus this repository at a pinned commit as real data:
cargo build --release -p arca-clicargo run --release -p arca-rar --example rar-corpus -- $env:TEMP\rar-corpusmkdir $env:TEMP\rar-corpus\repogit archive --format=tar 4b1d67b | tar -x -C $env:TEMP\rar-corpus\repopowershell -ExecutionPolicy Bypass -File arca-rar\tests\rar-bench.ps1 ` -Corpus $env:TEMP\rar-corpus -Runs 3 ` -Kinds "text,log,source,exe,media,random,small,repo,all"Each run is arca create out.rar <dir> -l N or Rar.exe a -mN -ep1 -r -idq out.rar <dir>, both non-solid, and every archive Arca writes is checked with Rar.exe t. "Before" is Arca at commit 4b1d67b, measured the same way the same day.
The whole corpus
all is the whole tree as one archive: the 77 MiB the generator writes plus the 16 MiB repo kind, 97,441,208 bytes in 4,286 files.
When these figures were taken, Arca's wall time here was mostly not the compressor: the writer spooled every member to its own temporary file before assembling the archive, and on Windows that cost milliseconds per file. Payloads now stay in memory; see "Many small files" below. CPU time is the figure to compare codecs by. Against WinRAR, Arca now uses 2.6× its CPU time at -l 1, 4.2× at -l 6 and 3.2× at -l 9, against 4.9×, 5.3× and 4.9× before. Its archives are 0.6% and 1.0% smaller at -l 1 and -l 3, and 2.1% to 2.6% larger from -l 6 up, almost all of it the media kind, where WinRAR applies a delta filter and Arca none.
By kind, -l 6 against -m3
On text, logs and source Arca writes 3% to 14% less than WinRAR at three to six times its CPU time; on the real repo kind the two are within 0.1% of each other at three times. media and random are now quicker than WinRAR, because the search steps over input that keeps finding nothing.
Many small files
The writer used to give each member's packed bytes a temporary file of its own beside the output, created, reopened by path for every batch of work that added to it and again to copy it into the archive, then deleted. On Windows those 3,000 rounds of the file system took far longer than compressing the small kind. Payloads now stay in memory, up to 1 MiB each and 128 MiB in all, counted inside the writer's 4 GiB managed-memory budget; a larger payload, or one past the 128 MiB, still goes to a temporary file. The archives are byte for byte the same.
Same machine, shared and busy again (median sampled load 59–71%). The small kind is 3,000 files and 7,246,984 bytes, non-solid, 16 threads; each figure is the median of 5 runs with the range in brackets, and the script checks the archive Arca writes at each level with Rar.exe t. Before is commit 17769b4, after is 2c4e246.
Sizes are unchanged: 3,752,642 and 3,668,621 bytes, against WinRAR's 3,814,162 and 3,549,840.
cargo build --release -p arca-clicargo run --release -p arca-rar --example rar-corpus -- $env:TEMP\rar-corpus 1.0 smallpowershell -ExecutionPolicy Bypass -File arca-rar\tests\rar-bench.ps1 ` -Corpus $env:TEMP\rar-corpus -Kinds small -Levels "1,3" -Runs 5 -Tools "arca,rar"The before row is the same command with -Arca pointing at a build of 17769b4 and -Tools arca.
Data filters
From -l 5 on Arca applies RAR 5's E8, E8E9, ARM and delta filters, chosen for each 64 KiB stretch of a file, as WinRAR does from -m3 (see arca-rar/vendor/PATCHES.md). The tables above predate them. Measured the same way, -Runs 3, with -Levels "3,4,5" -Kinds "exe,media,all"; "Before" is Arca at commit 17769b4, the last without filters, run the same day. The machine was busy again (load 40–99%), so CPU times are rough; sizes are exact.
The whole corpus is now 7.9%, 7.4% and 7.5% smaller than WinRAR at -l 6, -l 7 and -l 9, where it was 2.1%, 2.6% and 2.4% larger. media packs a third smaller than WinRAR's and costs three to four times the CPU it did, because filtered audio and pixels are worth searching where the raw bytes were stepped over, so media is no longer quicker than WinRAR. Random data still is: deciding that a region gets no filter is a pass over its bytes on the thread that reads, and on the random kind at -l 6 Arca took 0.91 to 1.05 s of CPU before and after alike. exe gains 5%; WinRAR's own filters make that synthetic code larger than its -mc- output. Text, logs, source and random data are left alone, byte for byte; repo comes out 1,449 bytes smaller (7,774,847) and small 103 bytes smaller (3,668,518), where a few binary files are filtered.
arca.exe is a real executable: the 7,475,200-byte release build of 17769b4 itself (cargo build --release -p arca-cli, SHA-256 a1f29ea94bc3ac117c89df4634bb083941f68148a6212e3cb70842be5c82cc09), placed alone in a directory and run with -Kinds arcaexe -Levels "3,5". Another build of the same commit gives other bytes, so the figures hold for that file. Arca is 0.2% larger than WinRAR at -l 6 and 1.6% smaller at -l 9.
Where Arca still loses
- CPU time. The optimal parse searches a binary tree at every position and prices every match length. It packs smaller than WinRAR on text, logs and source, and from
-l 3up it still costs three to six times WinRAR's CPU time. - Filters where WinRAR has them and Arca does not. Solid archives and files over 64 MiB are written without data filters, which WinRAR applies to both; the filters also see each 64 KiB stretch whole, where WinRAR narrows a delta range to a few hundred bytes inside one.
- Many small files. Still slower than WinRAR, though no longer by a factor of twenty: 2.05 s against 1.21 s at
-l 6, most of the difference the compressor's CPU time. Each source is still asked for its metadata while the archive is planned and reopened to be read, and a stored member is read twice. - Encrypted archives of many files. Every encrypted member gets its own salt, so the writer runs the 2^15-round key derivation, about 15 ms, once per member, one member after another, and the check that follows runs it again for every member it decrypts.
- Headers. Arca records a BLAKE2sp hash for every file where WinRAR records a CRC32, 28 bytes more per file: about 84 KB of the
smallkind. - A few big files. A member is compressed in runs of one dictionary each (1 to 16 MiB by level), and each run is one job, so a single 4 MiB file at
-l 6uses one core.