Skip to content

Commit

Permalink
Merge #32
Browse files Browse the repository at this point in the history
32: Minimize deps r=Urhengulas a=Urhengulas

This PR disables the default features of the dependency `object`, which results in good gains in build time (debug: `-2.622s`; release: `-3.676s`) and binary size (debug: `-4.6MB`; release: `-69.3kB`) _(see results below)_.

It also updates and upgrades the other dependencies.

---
```command
# this pr
$ hyperfine -p 'cargo clean' 'cargo build' 'cargo build --release'
Benchmark #1: cargo build
  Time (mean ± σ):      6.959 s ±  0.216 s    [User: 38.446 s, System: 2.313 s]
  Range (min … max):    6.476 s …  7.200 s    10 runs
 
Benchmark #2: cargo build --release
  Time (mean ± σ):     12.412 s ±  0.209 s    [User: 102.318 s, System: 2.519 s]
  Range (min … max):   12.196 s … 12.907 s    10 runs
 
Summary
  'cargo build' ran
    1.78 ± 0.06 times faster than 'cargo build --release'

$ exa -lB target/debug/flip-link && exa -lB target/release/flip-link
.rwxr-xr-x@ 19,621,368 urhengulas 11 Apr 17:18 target/debug/flip-link
.rwxr-xr-x@ 4,460,304 urhengulas 11 Apr 17:18 target/release/flip-link

# main
$ hyperfine -p 'cargo clean' 'cargo build' 'cargo build --release'
Benchmark #1: cargo build
  Time (mean ± σ):      9.581 s ±  0.112 s    [User: 55.811 s, System: 3.263 s]
  Range (min … max):    9.355 s …  9.765 s    10 runs
 
Benchmark #2: cargo build --release
  Time (mean ± σ):     16.088 s ±  0.116 s    [User: 150.146 s, System: 3.622 s]
  Range (min … max):   15.909 s … 16.281 s    10 runs
 
Summary
  'cargo build' ran
    1.68 ± 0.02 times faster than 'cargo build --release'

$ exa -lB target/debug/flip-link && exa -lB target/release/flip-link
.rwxr-xr-x@ 24,227,272 urhengulas 11 Apr 17:18 target/debug/flip-link
.rwxr-xr-x@ 4,529,560 urhengulas 11 Apr 17:18 target/release/flip-link
```

Co-authored-by: Urhengulas <[email protected]>
  • Loading branch information
bors[bot] and Urhengulas authored Apr 12, 2021
2 parents 14a842c + 767fe5b commit d0a3199
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 59 deletions.
57 changes: 2 additions & 55 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ version = "0.1.2"
readme = "README.md"

[dependencies]
anyhow = "1.0.32"
anyhow = "1.0.40"
env_logger = "0.8.3"
log = "0.4.11"
object = "0.23.0"
tempfile = "3.1.0"
log = "0.4.14"
object = { version = "0.23.0", default-features = false, features = ["read_core", "elf", "std"] }
tempfile = "3.2.0"

0 comments on commit d0a3199

Please sign in to comment.