Skip to content

Commit

Permalink
Version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed Jul 20, 2018
1 parent 879ca01 commit d110949
Show file tree
Hide file tree
Showing 25 changed files with 339 additions and 218 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### Version 2.0.0
- [SEMVER_MAJOR] Make PngError a proper Error enum
- [SEMVER_MINOR] Bump minimum Rust version to 1.27.0
- [SEMVER_MINOR] Make Rayon an optional dependency (enabled by default)
- [SEMVER_MINOR] Option to limit wall clock time spent in optimization trials
- [SEMVER_MINOR] `--keep` option (works similar to `--strip`, but takes a comma-separated list of headers to keep, and removes all other non-critical headers)
- Use faster Cloudflare zlib compression on platforms that support it
- Allow specifying more than 2 filter types via the CLI
- Avoid double glob processing on unix
- Fix reading from stdin
- Cleanup help text
- Various performance improvements

### Version 1.0.4
- Bump `image` to 0.19.0
- Bump `bit-vec` to 0.5.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ homepage = "https://github.com/shssoichiro/oxipng"
license = "MIT"
name = "oxipng"
repository = "https://github.com/shssoichiro/oxipng"
version = "1.0.4"
version = "2.0.0"

[badges]
travis-ci = { repository = "shssoichiro/oxipng", branch = "master" }
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,39 +94,39 @@ Oxipng is open-source software, distributed under the MIT license.

## Benchmarks

Tested oxipng 1.0.3 (compiled on rustc 1.25.0 (84203cac6 2018-03-25)) against OptiPNG version 0.7.7 on Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz with 8 logical cores
Tested oxipng 2.0.0 (compiled on rustc 1.27.2 (58cc626de 2018-07-18)) against OptiPNG version 0.7.7 on Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz with 8 logical cores



Benchmark #1: ./target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png

Time (mean ± σ): 201.1 ms ± 4.1 ms [User: 340.1 ms, System: 42.8 ms]
Time (mean ± σ): 91.2 ms ± 2.4 ms [User: 173.7 ms, System: 15.7 ms]

Range (min … max): 195.3 ms … 210.1 ms
Range (min … max): 86.4 ms … 97.7 ms

Benchmark #2: optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png

Time (mean ± σ): 418.8 ms ± 4.6 ms [User: 415.0 ms, System: 2.7 ms]
Time (mean ± σ): 281.0 ms ± 2.1 ms [User: 280.4 ms, System: 0.8 ms]

Range (min … max): 411.0 ms … 425.4 ms
Range (min … max): 279.3 ms … 286.4 ms

Summary

'./target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
2.08x faster than 'optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'
'./target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
3.08x faster than 'optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'
Benchmark #1: ./target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png

Time (mean ± σ): 330.9 ms ± 10.3 ms [User: 1.062 s, System: 0.045 s]
Time (mean ± σ): 116.5 ms ± 3.0 ms [User: 438.8 ms, System: 20.0 ms]

Range (min … max): 315.3 ms … 344.0 ms
Range (min … max): 111.6 ms … 122.3 ms

Benchmark #2: optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png

Time (mean ± σ): 1.424 s ± 0.011 s [User: 1.418 s, System: 0.002 s]
Time (mean ± σ): 942.6 ms ± 1.4 ms [User: 939.3 ms, System: 2.7 ms]

Range (min … max): 1.412 s 1.448 s
Range (min … max): 941.0 ms945.5 ms

Summary

'./target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
4.30x faster than 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'
'./target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
8.09x faster than 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'
6 changes: 2 additions & 4 deletions benches/deflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ extern crate oxipng;
extern crate test;

use oxipng::internal_tests::*;
use test::Bencher;
use std::path::PathBuf;
use test::Bencher;

#[bench]
fn deflate_16_bits_strategy_0(b: &mut Bencher) {
Expand Down Expand Up @@ -256,7 +256,5 @@ fn inflate_generic(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, false).unwrap();

b.iter(|| {
inflate(png.idat_data.as_ref())
});
b.iter(|| inflate(png.idat_data.as_ref()));
}
2 changes: 1 addition & 1 deletion benches/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ extern crate oxipng;
extern crate test;

use oxipng::internal_tests::*;
use test::Bencher;
use std::path::PathBuf;
use test::Bencher;

#[bench]
fn filters_16_bits_filter_0(b: &mut Bencher) {
Expand Down
2 changes: 1 addition & 1 deletion benches/interlacing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ extern crate oxipng;
extern crate test;

use oxipng::internal_tests::*;
use test::Bencher;
use std::path::PathBuf;
use test::Bencher;

#[bench]
fn interlacing_16_bits(b: &mut Bencher) {
Expand Down
2 changes: 1 addition & 1 deletion benches/reductions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ extern crate oxipng;
extern crate test;

use oxipng::internal_tests::*;
use test::Bencher;
use std::path::PathBuf;
use test::Bencher;

#[bench]
fn reductions_16_to_8_bits(b: &mut Bencher) {
Expand Down
2 changes: 1 addition & 1 deletion benches/zopfli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ extern crate oxipng;
extern crate test;

use oxipng::internal_tests::*;
use test::Bencher;
use std::path::PathBuf;
use test::Bencher;

#[bench]
fn zopfli_16_bits_strategy_0(b: &mut Bencher) {
Expand Down
Loading

0 comments on commit d110949

Please sign in to comment.