-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Improving binary size for encoding v1 #6096
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark for 4620a68Click to view benchmark
|
Benchmark for 8147e89Click to view benchmark
|
jjcnn
reviewed
Jun 7, 2024
Benchmark for e190f83Click to view benchmark
|
Benchmark for fbc6599Click to view benchmark
|
IGI-111
reviewed
Jun 10, 2024
IGI-111
previously approved these changes
Jun 10, 2024
Benchmark for eeff563Click to view benchmark
|
xunilrj
force-pushed
the
xunilrj/encoding-v1-optimize-size
branch
2 times, most recently
from
June 10, 2024 15:55
fabc945
to
d4cb2c3
Compare
Benchmark for 0c2b493Click to view benchmark
|
Benchmark for b35e0c0Click to view benchmark
|
xunilrj
force-pushed
the
xunilrj/encoding-v1-optimize-size
branch
from
June 11, 2024 14:15
61e0d32
to
94257d4
Compare
Benchmark for 94f4145Click to view benchmark
|
IGI-111
previously approved these changes
Jun 13, 2024
Benchmark for 89101b5Click to view benchmark
|
xunilrj
force-pushed
the
xunilrj/encoding-v1-optimize-size
branch
from
June 20, 2024 10:40
dbcc381
to
7271618
Compare
xunilrj
force-pushed
the
xunilrj/encoding-v1-optimize-size
branch
from
June 20, 2024 11:03
7271618
to
abc4774
Compare
Benchmark for 6a6603cClick to view benchmark
|
Benchmark for fc86247Click to view benchmark
|
sdankel
approved these changes
Jun 20, 2024
JoshuaBatty
reviewed
Jun 21, 2024
IGI-111
approved these changes
Jun 21, 2024
Benchmark for 9981ce6Click to view benchmark
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements five optimizations to decrease the binary size of contracts:
1 - create
BufferReader
only once;2 -
BufferReader
using only one pointer to the current position;3 - more specialized read fns for
BufferReader
;4 - remove useless binary operations;
5 - do not encode the result of a contract method, if it is
()
.Which brings the contract
test_fuel_coin_contract
from 3400 to 2560 bytes. Around 25% improvement. Results will be more timid for bigger contracts.Checklist
Breaking*
orNew Feature
labels where relevant.