-
Notifications
You must be signed in to change notification settings - Fork 432
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
Remove always
from inline
to allow compiler decide that to do
#1012
Remove always
from inline
to allow compiler decide that to do
#1012
Conversation
… form: Original wasm size: 66.7K, Optimized: 30.2K To: Original wasm size: 63.9K, Optimized: 27.4K
This looks promising! We should wait until the |
Codecov Report
@@ Coverage Diff @@
## master #1012 +/- ##
==========================================
- Coverage 78.86% 78.84% -0.03%
==========================================
Files 245 245
Lines 9246 9246
==========================================
- Hits 7292 7290 -2
- Misses 1954 1956 +2
Continue to review full report at Codecov.
|
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.
Very nice discovery!
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.
So here are the changes in size of our example contracts compared to master
. Note that all sizes are in KB, and -
means that it is smaller with this PR applied.
contract-terminate,0.0,0.0
rand-extension,-0.055000305,-0.12400007
incrementer,0.035999298,-0.06700015
erc1155,-63.791008,-62.012
trait-erc20,-2.6740036,-2.7460003
dns,-0.10300064,-0.22099876
delegator,0.38000107,0.15100002
multisig,-14.578995,-13.453999
subber,0.20700073,0.14900017
flipper,0.069000244,-0.03699994
erc20,-2.675003,-2.7460003
trait-flipper,0.024999619,-0.06700003
contract-transfer,0.0,0.0
trait-incrementer,-0.20399857,-0.32500005
erc721,-3.8440018,-3.9720001
adder,0.20700073,0.14900017
accumulator,0.20699883,0.14900017
Notice the dramatic size reduction to the ERC-1155 example 🤯. We should really do some digging and figure out why this "simple" change has produced such a great improvement there.
@xgreenx We want to give you a tip for all the great stuff you have contributed now and in the past. We're happy to have you as part of our ecosystem! Could you edit your description of this PR and add either one of those?
or
|
Glad to hear it=) Thank you, it is part of our grant, so you don't need to worry about it(=
Hmm, contracts that use |
I tried to return |
/tip medium |
A medium tip was successfully submitted for xgreenx (1nNaTpU9GHFvF7ZrSMu2CudQjXftR8Aqx58oMDgcuoH8dKe on polkadot). |
…-ink#1012) It funny, but removing `always`, reduces the size of `Erc20` contract form: Original wasm size: 66.7K, Optimized: 30.2K To: Original wasm size: 63.9K, Optimized: 27.4K
It's funny, but removing
always
with combination use-ink/cargo-contract#358, reduces the size ofErc20
contract inmaster
from 31.4K to 27.4K