Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: FLAC v1.4.x Performance Tests (Read 16092 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: FLAC v1.4.x Performance Tests

Reply #1
At Netranger's request, here's a new topic for v1.4.x testing...

A short test of Case's 1.4.1 build on my Intel Core i7-7700 CPU @ 3.60GHz:
(NB. Compared to this test, I changed the test procedure (added --silent to flac options) -> little speed increase and less variations between the different test runs)
Code: [Select]
FLAC Binary: flac140_Case.exe -7 (852992 Bytes)
- Average time  = 29.407 seconds, Encoding speed = 367.67x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac141_Case.exe -7 (844800 Bytes)
- Average time  = 29.780 seconds, Encoding speed = 363.06x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac140_Case.exe -7 (852992 Bytes)
- Average time  = 45.762 seconds, Encoding speed = 236.27x
- FLAC file size = 1.166.206.855 Bytes (= 61,145% of WAV size)

FLAC Binary: flac141_Case.exe -8 (844800 Bytes)
- Average time  = 46.053 seconds, Encoding speed = 234.77x
- FLAC file size = 1.166.206.855 Bytes (= 61,145% of WAV size)
So I can't confirm ktf's assumption (Binary might be an unmeasurable tiny amount faster because the binary is slightly smaller).
At least as far as Case's builds are concerned.

Meanwhile I've upgraded my main computer to the next CPU generation: Intel Core i7-8700 CPU @ 3.20GHz
Except being a little faster, the results are comparable:
Code: [Select]
FLAC Binary: flac140_Case.exe -7 (852992 Bytes)
- Average time  = 27.269 seconds, Encoding speed = 396.50x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac140_Case.exe -8 (852992 Bytes)
- Average time  = 42.676 seconds, Encoding speed = 253.35x
- FLAC file size = 1.166.206.855 Bytes (= 61,145% of WAV size)

FLAC Binary: flac141_Case.exe -7 (844800 Bytes)
- Average time  = 27.487 seconds, Encoding speed = 393.36x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac141_Case.exe -8 (844800 Bytes)
- Average time  = 42.478 seconds, Encoding speed = 254.53x
- FLAC file size = 1.166.206.855 Bytes (= 61,145% of WAV size)


Re: FLAC v1.4.x Performance Tests

Reply #2
One more time of my performance test of different flavors of FLAC 1.4.1 (Win64) on my Win10, i7-1185G7 Laptop.
Using a 16bit/44.1khz WAV file, size: 2.710.211.996 byte, Flac @ -8

Long story short:

flac141case-hashwell: ~56.5s
flac141xiph: ~60.8s
flac141rarewares-avx2: ~57.6s

Code: [Select]
PS C:\temp\FLAC141> Measure-Command { .\flac141case-hashwell.exe -8 image.wav -f -o image.flac.141case-hashwell.flac | Out-Default }

flac 1.4.1
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

image.wav: wrote 1619924066 bytes, ratio=0,598


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 56
Milliseconds      : 506
Ticks             : 565069945
TotalDays         : 0,000654016140046296
TotalHours        : 0,0156963873611111
TotalMinutes      : 0,941783241666667
TotalSeconds      : 56,5069945
TotalMilliseconds : 56506,9945



PS C:\temp\FLAC141> Measure-Command { .\flac141xiph.exe -8 image.wav -f -o image.flac.141xiph.flac | Out-Default }

flac 1.4.1
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

image.wav: wrote 1619924066 bytes, ratio=0,598


Days              : 0
Hours             : 0
Minutes           : 1
Seconds           : 0
Milliseconds      : 813
Ticks             : 608136756
TotalDays         : 0,000703861986111111
TotalHours        : 0,0168926876666667
TotalMinutes      : 1,01356126
TotalSeconds      : 60,8136756
TotalMilliseconds : 60813,6756



PS C:\temp\FLAC141> Measure-Command { .\flac141rarewares-avx2.exe -8 image.wav -f -o image.flac.141rarewares-avx2.flac | Out-Default }

flac 1.4.1
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

image.wav: wrote 1619924072 bytes, ratio=0,598


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 57
Milliseconds      : 670
Ticks             : 576700994
TotalDays         : 0,000667478002314815
TotalHours        : 0,0160194720555556
TotalMinutes      : 0,961168323333333
TotalSeconds      : 57,6700994
TotalMilliseconds : 57670,0994



PS C:\temp\FLAC141>
.halverhahn

Re: FLAC v1.4.x Performance Tests

Reply #3
i3-12100, single wav CDDA image, all tested in RAM drive:

Case -8
Total encoding time: 0:17.078, 264.75x realtime
Case -7p
Total encoding time: 0:23.672, 191.00x realtime

john33 avx2 -8
Total encoding time: 0:18.203, 248.39x realtime
john33 avx2 -7p
Total encoding time: 0:28.234, 160.14x realtime

xiph -8
Total encoding time: 0:17.734, 254.95x realtime
xiph -7p
Total encoding time: 0:22.922, 197.25x realtime

Re: FLAC v1.4.x Performance Tests

Reply #4
Your plain -8 numbers are pretty similar to my Ryzen 5900x.
Still for -8 -p the official xiph binaries are clearly the fastest.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: FLAC v1.4.x Performance Tests

Reply #5
Yes, xiph is the fastest on 8p for me as well:

xiph:
Total encoding time: 0:45.406, 99.57x realtime
Case:
Total encoding time: 0:50.281, 89.92x realtime
john33 avx2:
Total encoding time: 1:03.641, 71.04x realtime

Re: FLAC v1.4.x Performance Tests

Reply #6
And here's another round of tests with -7 (Intel Core i7-8700 CPU @ 3.20GHz):
Code: [Select]
FLAC Binary: xiph-140\flac.exe -7 (328704 Bytes)
- Average time  = 28.104 seconds (10 rounds), Encoding speed = 384.72x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: xiph-141\flac.exe -7 (299520 Bytes)
- Average time  = 27.900 seconds (10 rounds), Encoding speed = 387.53x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac140_Case.exe -7 (852992 Bytes)
- Average time  = 27.559 seconds (10 rounds), Encoding speed = 392.32x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac141_Case.exe -7 (844800 Bytes)
- Average time  = 27.707 seconds (10 rounds), Encoding speed = 390.22x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac141-john-avx2.exe -7 (1212928 Bytes)
- Average time  = 30.217 seconds (10 rounds), Encoding speed = 357.81x
- FLAC file size = 1.167.014.370 Bytes (= 61,188% of WAV size)

FLAC Binary: flac141-case-haswell.exe -7 (860160 Bytes)
- Average time  = 25.416 seconds (10 rounds), Encoding speed = 425.40x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)

FLAC Binary: flac141-case-gcc12.exe -7 (781312 Bytes)
- Average time  = 26.174 seconds (10 rounds), Encoding speed = 413.08x
- FLAC file size = 1.167.014.383 Bytes (= 61,188% of WAV size)
tldr;
With the official xiph binary ktf is right: 141 is a bit faster than 140.
Case's binaries still outperform xiph on my setup, but the difference is small (see note below).
Case's Haswell build is the fastest on my setup at -7. I will re-run my tests with -8.

NB. I realized that in my test here I mislabeled the flac140.exe binary. It was NOT the official binary from xiph! Sorry for that.

Re: FLAC v1.4.x Performance Tests

Reply #7
Here's another 1.4.1 compile with newer GCC (12.2.0). Over here it's faster than Xiph build even with -p.
Yes. Both -8 and -8p are improved. Same test as my previous posts:
-8
Total encoding time: 0:16.547, 273.24x realtime
-8p
Total encoding time: 0:44.312, 102.03x realtime

Re: FLAC v1.4.x Performance Tests

Reply #8
Code: [Select]
FLAC Binary: xiph-141\flac.exe (299520 Bytes)
- Average time  = 41.038 seconds (5 rounds), Encoding speed = 263.46x
- FLAC file size = 1.166.206.855 Bytes (= 61,145% of WAV size)

FLAC Binary: flac141-case-haswell.exe (860160 Bytes)
- Average time  = 38.473 seconds (5 rounds), Encoding speed = 281.03x
- FLAC file size = 1.166.206.855 Bytes (= 61,145% of WAV size)

FLAC Binary: flac141-john-avx2.exe (1212928 Bytes)
- Average time  = 46.881 seconds (5 rounds), Encoding speed = 230.63x
- FLAC file size = 1.166.206.863 Bytes (= 61,145% of WAV size)

FLAC Binary: flac141-case-gcc12.exe (781312 Bytes)
- Average time  = 39.323 seconds (5 rounds), Encoding speed = 274.95x
- FLAC file size = 1.166.206.855 Bytes (= 61,145% of WAV size)

Speed ranking with -8 here: Case-Haswell -> Case-GCC12 -> Xiph -> John-AVX2

Re: FLAC v1.4.x Performance Tests

Reply #9
Case and Xiph is ~102x for -8 -p on the Ryzen 5900x, nice.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: FLAC v1.4.x Performance Tests

Reply #10
And finally with -8p (although out of my league):
Code: [Select]
FLAC Binary: flac141-case-gcc12.exe (781312 Bytes)
- Average time  = 127.483 seconds (5 rounds), Encoding speed = 84.81x
- FLAC file size = 1.165.475.620 Bytes (= 61,107% of WAV size)

FLAC Binary: flac141-case-haswell.exe (860160 Bytes)
- Average time  = 128.832 seconds (5 rounds), Encoding speed = 83.92x
- FLAC file size = 1.165.475.620 Bytes (= 61,107% of WAV size)

FLAC Binary: xiph-141\flac.exe (299520 Bytes)
- Average time  = 134.315 seconds (5 rounds), Encoding speed = 80.50x
- FLAC file size = 1.165.475.620 Bytes (= 61,107% of WAV size)

FLAC Binary: flac141-john-avx2.exe (1212928 Bytes)
- Average time  = 190.607 seconds (3 rounds), Encoding speed = 56.72x
- FLAC file size = 1.165.475.622 Bytes (= 61,107% of WAV size)
Here Case's GCC12 build is the fastest, but both of Case's binaries are faster than Xiph on my setup.

Re: FLAC v1.4.x Performance Tests

Reply #11
Got Windows screaming false positives on the various compiles posted here, so ... no 1.4.1 speed tests from me until next set of definitions downloaded.
(Submitting false positives reports to Microsoft isn't outright easy?)

Re: FLAC v1.4.x Performance Tests

Reply #12
1.4.0 compiles then, augmenting the Intel figures from here with Ryzen 2500U and also did flac -0 for those who want the fastest. Reply number is from that thread.

I don't know how much the individual figures can be trusted - and if I ever do this again, it will not be on 1.4.0 - but the overall picture among the fastest is pretty clear: the Case compile wins on -0 and -5, and the official build wins at -7p.  I suspect it is when it calls for several residual compressions then?


-0. Why @john33's newer Intel compile is so good compared to the other builds posted I don't know - maybe order of runs matter, if the CPU has just struggled less or more, but just speculations. Adding up it overtakes the Xiph build.
Intel   Ryzen (much cheaper)   numbers are ordered by Intel
211      258      Case compile (x64) from reply 57
238      312      Xiph (x64 only)
240      293      john33's reply 82 with newer compile
240      332      NetRanger GCC-64 from Reply 10
254      348      NetRanger GCC-32 from Reply 10
258      n/a      Rarewares-x64 from john33's Reply 34 (first link)
264      367      Rarewares-x86-nonXP from john33's Reply 34 (first link)
269      360      NetRanger CLANG14-64 from Reply 15
274      360      NetRanger CLANG15-w64 from Reply 68
276      365      Rarewares-x86 from john33's Reply 34 (second link)
282      381      NetRanger CLANG14-32 from Reply 15
295      383      NetRanger CLANG15-w32
Rarewares-x64 produced strange numbers. Didn't go back and check again.


-5:
Intel   Ryzen   numbers are ordered by Intel
256      353      Case compile (x64) from reply 57
271      372      Xiph (x64 only)
298      375      john33's reply 82 with newer compile
300      412      Rarewares-x64 from john33's Reply 34 (first link)
321      481      NetRanger CLANG14-64 from Reply 15
328      462      Rarewares-x86-nonXP from john33's Reply 34 (first link)
330      464      Rarewares-x86 from john33's Reply 34 (second link)
336      454      NetRanger GCC-32 from Reply 10
344      447      NetRanger GCC-64 from Reply 10
347      450      NetRanger CLANG14-32 from Reply 15
366      n/a      NetRangerCLANG15-w64 from Reply 68
395      457      NetRangerCLANG15-w32
Deleted a nonsense result from CLANG15. Did Windows Update run or something?

-7p. Results start to vary, I wonder how much they can be trusted. Xiph was run immediately after all the -5 were done, maybe -5 was not enough to heat up the CPU that much. Will not re-run any 1.4.zero .
Intel   Ryzen    numbers are ordered by Intel and here the Ryzen numbers are not much in order.
 831      1279      Xiph (x64 only)
 880      1539      Case compile (x64)
 882      1426      NetRanger GCC-64
1006      1632      NetRanger GCC-32
1015      1600      NetRanger CLANG14-64
1029      1442      john33's reply 82 with newer compile
1035      1431      Rarewares-x64
1089      1888      Rarewares-x86
1170      1573      NetRanger CLANG14-32
1284      1862      Rarewares-x86-nonXP
1508      1783      NetRanger CLANG15-64
n/a       1797      NetRanger CLANG15-32
User aborted the CLANG15-32 was on Intel after, and the CLANG14-32 on Ryzen - the latter after two runs had completed, consistent figures, so was included.


 

Re: FLAC v1.4.x Performance Tests

Reply #13
If you get weird times with john33 AVX2 compile, it might be CPU overheating - AVX2 is extremely heavy on power and heat, if there are any cooling deficiencies, CPU will throttle.

Re: FLAC v1.4.x Performance Tests

Reply #14
Quite possible. Everything was done on laptops. Dell with Intel and consumer-grade Acer with Ryzen. I've had three generations of Dell Latitude, and consumer-grade Dell before that - Dell fan control was and remains a mystery.

A "speed concern" is also, how much are you doing at the time? If one is compressing only a few albums, one will wait for it to finish and then time is annoying - and then half of them might be done before the worst throttling kicks in, maybe?
If one is compressing a lot of them, overnight at full steam, that is something else - but speed is not that crucial as long as it only makes the difference between done at 0430 and done at 0510.
If one is migrating to (new) FLAC - running for days and weeks - then both duration and heat (slowdown and fan speed on a computer you are usinig every day) would be a big thing again.

Re: FLAC v1.4.x Performance Tests

Reply #15
Long story short: on all of the Intels I've tried, from Gen.4 to Gen.8, the Haswell build by Case is the fastest one. Using -6 because I like to use -6, best speed/compression ratio IMHO.
But an older Flac 1.3.3 x64 build by Case is slightly faster with only 152940 bytes more out of 583 MB:

Flac 1.3.3 x64 by Case 11/08/2019
Code: [Select]
flac 1.3.3
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

flac.wav: wrote 611507403 bytes, ratio=0,734

Kernel  Time =     0.812 =    6%
User    Time =    10.687 =   88%
Process Time =    11.500 =   94%    Virtual  Memory =     14 MB
Global  Time =    12.140 =  100%    Physical Memory =     13 MB


Flac 1.4.1 x64 Haswell by Case 23/09/2022
Code: [Select]
flac 1.4.1
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

flac.wav: wrote 611354463 bytes, ratio=0,734

Kernel  Time =     0.687 =    5%
User    Time =    11.671 =   92%
Process Time =    12.359 =   97%    Virtual  Memory =     14 MB
Global  Time =    12.685 =  100%    Physical Memory =     17 MB

Re: FLAC v1.4.x Performance Tests

Reply #16
Using -6 because I like to use -6, best speed/compression ratio IMHO.
What CPU? All testing I have done so far, indicates that -6 is the useless one; -7 is quite close to -6 on time (on Intel) and quite close to -8 at size. Visualised by ktf at https://hydrogenaud.io/index.php/topic,120158.msg1014227.html#msg1014227 - see the third diagram that starts at -4.
-6 was even more strikingly bad with 1.3.4 it seems.


Re: FLAC v1.4.x Performance Tests

Reply #17
Don't know about specific CPUs but -6 is pretty poor on compression ratio. -7 is the best for speed vs compression ratio IMO. As for throttling, run HWiNFO in background so one knows that the CPU is throttled. Pretty much a non-issue for desktop systems with AVX2 stress tests on all cores.
X

Re: FLAC v1.4.x Performance Tests

Reply #18
It depends on CPU and cooling, some are designed to be low on power & heat, yet my i7-4790K with a huge tower air cooler hits 100C with Prime95 AVX2 stress test and is very close to Tcase with everyday AVX2 apps.
With current turbo technology you may miss turbo targets when it's warmer and will get varying results.
Laptops are always cooling deficient.

Re: FLAC v1.4.x Performance Tests

Reply #19
I've tried with -7 and 1.3.3 is still faster than 1.4.1:

Flac 1.3.3 x64 by Case 11/08/2019
Code: [Select]
flac 1.3.3
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

flac.wav: wrote 609653841 bytes, ratio=0,732

Kernel  Time =     0.828 =    6%
User    Time =    12.250 =   91%
Process Time =    13.078 =   97%    Virtual  Memory =     14 MB
Global  Time =    13.345 =  100%    Physical Memory =     13 MB

Flac 1.4.1 x64 Haswell by Case 23/09/2022
Code: [Select]
flac 1.4.1
Copyright (C) 2000-2009  Josh Coalson, 2011-2022  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

flac.wav: wrote 609301753 bytes, ratio=0,732

Kernel  Time =     0.593 =    3%
User    Time =    14.000 =   93%
Process Time =    14.593 =   97%    Virtual  Memory =     14 MB
Global  Time =    14.967 =  100%    Physical Memory =     13 MB


Re: FLAC v1.4.x Performance Tests

Reply #21
Edit: If you want a competition to -6, try -5 -l 10 and see what happens. Compare to both old -6 and new -6. (Reason: it seems it is the low -l that makes -6 underperform.)

1.3.3 is still faster than 1.4.1:
Sure, but compare to 1.3.3 at -8 and see which one is fastest and compresses best?
I did that (corpus in my signature), and 1.4.0 at -7 was faster and compressed better than 1.3.4 at both -8 and -8p. (And -8e too, naturally.)

1.4 starts using double-precision coefficients, which gave the competition an upper hand for fifteen years. Double precision takes a bit more time, but compresses better. The impact is greatest on high resolution material (well similar has been seen on lower resolution when there is not much content in the top octave). See that thread, first my reply 33 and then ktf testing upsampled material in reply 94.

(If 1.4 takes more time at high presets, then why not on 0, 1, 2? Code improvements.)

Re: FLAC v1.4.x Performance Tests

Reply #22
OK here are my speed and temperature tests, running 109 tracks in -8pe to make the test longer and uses all cores.

john33 AVX2
Total encoding time: 8:57.484, 38.06x realtime
Case Haswell
Total encoding time: 7:04.062, 48.24x realtime
Xiph
Total encoding time: 5:59.062, 56.98x realtime
Case GCC 12.2.0
Total encoding time: 5:55.157, 57.60x realtime

CPU package max temperature:
Case Haswell: 92C, the only one with "Yes" on "Power Limit Exceeded", no throttling though, it's a non-k i3 after all.
X

Xiph: 91C
X

Case GCC 12.2.0 88C
X

john33 AVX2 87C
X

The screenshot on Reply #17 can be used as a reference idle temperature. All tests ran on the stock cooler.

Re: FLAC v1.4.x Performance Tests

Reply #23
Double precision takes a bit more time, but compresses better.
I don't really care about compression (=storage) but I do care about speed and CPU (=electricity bill) especially these days ;)

Re: FLAC v1.4.x Performance Tests

Reply #24
I don't really care about compression (=storage) but I do care about speed and CPU (=electricity bill) especially these days ;)

Then read the entire post:

I did that (corpus in my signature), and 1.4.0 at -7 was faster and compressed better than 1.3.4 at both -8 and -8p. (And -8e too, naturally.)

So if you care more about speed than compression, just lower the preset and you will get both better and faster compression.

And if you only care about speed and energy usage while the size doesn't matter at all, don't compress at all - just use WAV. Can't beat that.