Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable link-time optimization for release builds - #177

Merged
shssoichiro merged 2 commits into
oxipng:masterfrom
Calinou:enable-lto-release
Jun 26, 2019
Merged

Enable link-time optimization for release builds#177
shssoichiro merged 2 commits into
oxipng:masterfrom
Calinou:enable-lto-release

Conversation

@Calinou

@Calinou Calinou commented Jun 18, 2019

Copy link
Copy Markdown
Contributor

This creates faster and smaller binaries, at the cost of longer build times.

Benchmark

  • OS: Fedora 30
  • CPU: i7-6700K @ 4.4 GHz
  • Compiler: rustc 1.35.0

This comparison was made by running oxipng -Zs on all images from this repository (while they were already optimized).

Before

Benchmark #1: oxipng -Zs **/*.png
  Time (mean Β± Οƒ):      1.576 s Β±  0.048 s    [User: 2.486 s, System: 0.238 s]
  Range (min … max):    1.518 s …  1.654 s    10 runs

After

Benchmark #1: oxipng -Zs **/*.png
  Time (mean Β± Οƒ):      1.495 s Β±  0.030 s    [User: 2.365 s, System: 0.232 s]
  Range (min … max):    1.429 s …  1.530 s    10 runs

It's not huge, but there's a noticeable speedup πŸ™‚

The release binary now weighs only 1.4 MB after stripping (compared to 1.7 MB before).

Calinou and others added 2 commits June 18, 2019 23:00
This creates faster and smaller binaries, at the cost of longer
build times.
@shssoichiro

Copy link
Copy Markdown
Collaborator

Thanks, especially for doing the benchmarks on this! Seems like it's worth the build time cost.

@shssoichiro
shssoichiro merged commit 5b5aeaa into oxipng:master Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants