WavPack again. Only .wv in this post. wvunpack and ffmpeg
-z0q and time. Does console output slow it down?
TL;DR: -vv is so fast that one can argue that yes it does.
An initial test wasn't dramatic: hyperfine on single untagged -f-encoded file indicated a cost of 0.05 seconds on decoding to NUL and 0.02 seconds for fast verify.
But, then. Since there is only wvunpack against itself to test on this matter, and it supports wildcards, I took two actual albums, with tags and all, in separate tracks, on a spinning drive: one full CD 75 minutes of Bach's organ works, 652 kbit/s using, 28 tracks/files. Black Sabbath s/t, 38:14, a CD split in 7 tracks/files, 903 kbit/s. Both using -x6.
Fast verification: -qz0 is significantly faster, in percents. 0.1 seconds isn't much though, but if one has a full TB of CDs (like 3000 of them), it will add up to a few minutes. 25 runs with two seconds sleep in between:
wvunpack *.wv -vv -qz0: 304 ms on Bach and 187 ms on Black Sabbath
wvunpack *.wv -vv : increases by 103 ms (36 percent) resp. 81 ms (46 percent)
Decoding to -o - > NUL: Since that takes more time, the percentages aren't that impressive of course. The differences in time look suspicious to be honest, but 19 runs and not too outrageous standard deviations:
wvunpack *.wv -z0qy -o - > NUL : 9.265 s ± 0.024 s resp. 4.917 s ± 0.025 s
wvunpack *.wv -yo - > NUL : 9.698 s ± 0.032 s resp. 5.039 s ± 0.013 s
Writing to the same spinning drive would bring it to 30 or 15 seconds, and that kinda sets the perspective.
But the fast decoding is now so fast that it seems that reporting the progress makes for something if one is scanning
Decoding speeds again. Tested more multithreading.
TL;DR: wvunpack --threads=<N> beats ffmpeg -threads <N> at decoding - with one exception where block size was forced to maximum.
I did the "shorter" half-hour file. Commands were like the following:
ffmpeg -threads 8 -i ¨3x.wv.-fx0.wv -hide_banner -loglevel error -f wav -y NUL
.\wvunpack --threads=8 ¨3x.wv.-fx0.wv -z0qyo -o - > NUL
the latter being the fastest. -fx0 in the filename because that option (it means -f ; -x0 in new releases means "no x", that is good for FOR looping). And yes there are two "o" options because I didn't spot it, but wvunpack didn't object.
Times first, mean ± stdev - having sorted the output by the .wv file and then by speed, fastest at top:
-f:
1.00 .\wvunpack --threads=8
1.09 ± 0.00 .\wvunpack --threads=7
1.13 ± 0.01 ffmpeg -threads 8
1.20 ± 0.01 ffmpeg -threads 7
1.54 ± 0.02 .\wvunpack --threads=4
1.90 ± 0.01 .\wvunpack --threads=3
1.95 ± 0.05 ffmpeg -threads 4
2.35 ± 0.05 ffmpeg -threads 3
3.65 ± 0.01 .\wvunpack --threads=1
4.94 ± 0.06 ffmpeg -threads 1
-x:
1.23 ± 0.04 .\wvunpack --threads=8
1.31 ± 0.01 .\wvunpack --threads=7
1.46 ± 0.01 ffmpeg -threads 8
1.55 ± 0.01 ffmpeg -threads 7
1.86 ± 0.03 .\wvunpack --threads=4
2.30 ± 0.02 .\wvunpack --threads=3
2.60 ± 0.01 ffmpeg -threads 4
2.99 ± 0.04 ffmpeg -threads 3
4.53 ± 0.02 .\wvunpack --threads=1
6.35 ± 0.02 ffmpeg -threads 1
Ran, but omitted from this list: -x --blocksize=4096 to see if it mattered. Not much except ffmpeg -threads 1 was up to 6.93.
-hx2:
1.70 ± 0.01 .\wvunpack --threads=8
1.80 ± 0.01 .\wvunpack --threads=7
2.00 ± 0.01 ffmpeg -threads 8
2.19 ± 0.18 ffmpeg -threads 7
2.48 ± 0.02 .\wvunpack --threads=4
3.08 ± 0.02 .\wvunpack --threads=3
3.43 ± 0.03 ffmpeg -threads 4
3.91 ± 0.03 ffmpeg -threads 3
5.95 ± 0.03 .\wvunpack --threads=1
8.79 ± 0.06 ffmpeg -threads 1
-hhx3:
2.21 ± 0.08 .\wvunpack --threads=8
2.27 ± 0.02 .\wvunpack --threads=7
2.66 ± 0.03 ffmpeg -threads 8
2.82 ± 0.01 ffmpeg -threads 7
3.17 ± 0.03 .\wvunpack --threads=4
3.92 ± 0.02 .\wvunpack --threads=3
4.52 ± 0.02 ffmpeg -threads 4
5.33 ± 0.11 ffmpeg -threads 3
7.67 ± 0.02 .\wvunpack --threads=1
11.77 ± 0.05 ffmpeg -threads 1
And finally, ffmpeg wins this one with maximum blocksize (except single-threaded)
-hhx4 --blocksize=131072
2.57 ± 0.01 ffmpeg -threads 8
2.75 ± 0.02 ffmpeg -threads 7
3.12 ± 0.06 .\wvunpack --threads=8
3.40 ± 0.03 .\wvunpack --threads=7
3.94 ± 0.05 ffmpeg -threads 4
4.84 ± 0.05 ffmpeg -threads 3
4.95 ± 0.03 .\wvunpack --threads=4
5.54 ± 0.02 .\wvunpack --threads=3
7.57 ± 0.04 .\wvunpack --threads=1
11.27 ± 0.09 ffmpeg -threads 1
A couple of remarks:
* I ran ffmpeg and wvunpack alternating with the same threads count, so that none of them should be disadvantaged over the CPU having just reacted to something (throttling or whatever). To make sure, I ran it twice: once with ffmpeg then wvunpack, once with wvunpack then ffmpeg. Very small differences.
* What I didn't think of ... because I am normally juggling a few versions of encoders, I the current wvunpack.exe to the same directory - it shouldn't make for a time advantage?! Maybe fix PATH next time.
WavPack -vv fast verification redux:
TL;DR: Put the --threads differences down on my system not being more consistent than the data below ... arguably, less consistent.
In case anyone is interested, I dump the hyperfine output in here.
Same files. Ran with and without threads (and a couple extra to check for inconsistencies, not included; one was off, but betrayed by a high stdev).
USB3 spinning drive. Fastest was 105.1 ms ± 2.8 ms
.wvunpack ¨3x.wv.-hhx4--blocksize=131072.wv -vv -z0q ran
1.01 ± 0.03 times faster than .wvunpack --threads=7 ¨3x.wv.-hhx4--blocksize=131072.wv -vv -z0q
1.02 ± 0.03 times faster than .wvunpack --threads=4 ¨3x.wv.-hhx4--blocksize=131072.wv -vv -z0q
1.08 ± 0.03 times faster than .wvunpack ¨3x.wv.-hhx3.wv -vv -z0q
1.08 ± 0.03 times faster than .wvunpack --threads=7 ¨3x.wv.-hx2.wv -vv -z0q
1.09 ± 0.03 times faster than .wvunpack --threads=4 ¨3x.wv.-hhx3.wv -vv -z0q
1.10 ± 0.04 times faster than .wvunpack --threads=4 ¨3x.wv.-hx2.wv -vv -z0q
1.10 ± 0.03 times faster than .wvunpack ¨3x.wv.-hx2.wv -vv -z0q
1.10 ± 0.06 times faster than .wvunpack --threads=7 ¨3x.wv.-hhx3.wv -vv -z0q
1.21 ± 0.03 times faster than .wvunpack --threads=4 ¨3x.wv.-gx1.wv -vv -z0q
1.21 ± 0.03 times faster than .wvunpack --threads=7 ¨3x.wv.-gx1.wv -vv -z0q
1.22 ± 0.05 times faster than .wvunpack ¨3x.wv.-gx1.wv -vv -z0q
1.23 ± 0.03 times faster than .wvunpack ¨3x.wv.-fx0.wv -vv -z0q
1.24 ± 0.04 times faster than .wvunpack --threads=4 ¨3x.wv.-fx0.wv -vv -z0q
1.26 ± 0.08 times faster than .wvunpack --threads=7 ¨3x.wv.-fx0.wv -vv -z0q
1.58 ± 0.04 times faster than .wvunpack --threads=7 ¨3x.wv.-gx1--blocksize=4096.wv -vv -z0q
1.58 ± 0.04 times faster than .wvunpack --threads=4 ¨3x.wv.-gx1--blocksize=4096.wv -vv -z0q
1.59 ± 0.05 times faster than .wvunpack ¨3x.wv.-gx1--blocksize=4096.wv -vv -z0q
Internal SSD. Fastest was 107.2 ms ± 2.2 ms.
.wvunpack --threads=7 ¨3x.wv.-hhx4--blocksize=131072.wv -vv -z0q ran
1.00 ± 0.03 times faster than .wvunpack --threads=4 ¨3x.wv.-hhx4--blocksize=131072.wv -vv -z0q
1.01 ± 0.03 times faster than .wvunpack ¨3x.wv.-hhx4--blocksize=131072.wv -vv -z0q
1.09 ± 0.03 times faster than .wvunpack --threads=7 ¨3x.wv.-hx2.wv -vv -z0q
1.09 ± 0.03 times faster than .wvunpack ¨3x.wv.-hhx3.wv -vv -z0q
1.10 ± 0.03 times faster than .wvunpack --threads=4 ¨3x.wv.-hhx3.wv -vv -z0q
1.10 ± 0.03 times faster than .wvunpack --threads=4 ¨3x.wv.-hx2.wv -vv -z0q
1.10 ± 0.03 times faster than .wvunpack --threads=7 ¨3x.wv.-hhx3.wv -vv -z0q
1.11 ± 0.03 times faster than .wvunpack ¨3x.wv.-hx2.wv -vv -z0q
1.21 ± 0.04 times faster than .wvunpack --threads=4 ¨3x.wv.-fx0.wv -vv -z0q
1.22 ± 0.03 times faster than .wvunpack ¨3x.wv.-gx1.wv -vv -z0q
1.23 ± 0.03 times faster than .wvunpack --threads=4 ¨3x.wv.-gx1.wv -vv -z0q
1.24 ± 0.06 times faster than .wvunpack ¨3x.wv.-fx0.wv -vv -z0q
1.25 ± 0.04 times faster than .wvunpack --threads=7 ¨3x.wv.-fx0.wv -vv -z0q
1.26 ± 0.05 times faster than .wvunpack --threads=7 ¨3x.wv.-gx1.wv -vv -z0q
1.55 ± 0.04 times faster than .wvunpack --threads=4 ¨3x.wv.-gx1--blocksize=4096.wv -vv -z0q
1.55 ± 0.04 times faster than .wvunpack ¨3x.wv.-gx1--blocksize=4096.wv -vv -z0q
1.57 ± 0.05 times faster than .wvunpack --threads=7 ¨3x.wv.-gx1--blocksize=4096.wv -vv -z0q