-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flac: build with cmake, fixes cross compilation #193886
Conversation
Built |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new binary performs noticeably worse. I suspect it ends up passing different optimization flags to the compiler in the end? Could you look into this?
Benchmark 1: result-bin-before/bin/flac -t album/*.flac
Time (mean ± σ): 5.037 s ± 0.113 s [User: 4.834 s, System: 0.120 s]
Range (min … max): 4.955 s … 5.282 s 10 runs
Benchmark 2: result-bin-cmake/bin/flac -t album/*.flac
Time (mean ± σ): 5.307 s ± 0.040 s [User: 5.072 s, System: 0.136 s]
Range (min … max): 5.257 s … 5.381 s 10 runs
Summary
'result-bin-before/bin/flac -t album/*.flac' ran
1.05 ± 0.03 times faster than 'result-bin-cmake/bin/flac -t album/*.flac'
Good catch! According to the project documentation, autotools and cmake should be equivalent: The autotools used following configuration:
When building with cmake, no configuration summary is available. I think this is an upstream issue. |
https://github.com/xiph/flac/blob/2440e19a733f045e50cd7f3dbd706b9ed98fc5ef/configure.ac#L508 sets |
Hmm, even with b8a03ce, there is a significant difference ... the binary is about 3% larger, and when I measure a Is there an easy way to trace the compiler invocations, so we can see which flags get passed? |
I am a fool, I was comparing the current PR to master, which still has flac 1.3.4..., the regression is an upstream one, unrelated to this PR. I now no longer find a difference between the two:
|
No problem :) |
I was just preparing a PR and got a merge conflict, thanks for already fixing this! My solution was worse (using |
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes