You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #584: reduce binary bloat by removing generic param from type_check
0c411db reduce binary bloat by removing generic param from type_check (Marko Bencun)
Pull request description:
The binary sizes are increased a lot by the use of generics. In one case, there is a lot of needless bloat by using a generic type param for the callback argument in the type_check function of the Property trait.
cargo build --example parse --release && du -sb target/release/examples/parse
Results in a binary size of 1784152 bytes.
With this commit, the binary size is decreased by 12288 bytes, which is significant for embedded/no_std use.
The sizes above were achieved by adding this to Cargo.toml:
```
[profile.release]
strip = true
panic = "abort"
opt-level = 's'
codegen-units = 1
lto = true
```
Though the difference is roughly the same also without the optimizations.
As an additional benefit, code clarity is improved as the child arg was unused in some of the trait implementations.
ACKs for top commit:
apoelstra:
ACK 0c411db
sanket1729:
ACK 0c411db
Tree-SHA512: 5526076230a3d5140279567813f87764fc09f3fc8e95d031bf98f52726041afdb262af715a3af19ccae2c0c85069460c20bbe4073364b7a4a4e1378602835e29
0 commit comments