Skip to content
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

Release 0.44.0 #659

Merged
merged 8 commits into from
Jan 22, 2024
Merged

Release 0.44.0 #659

merged 8 commits into from
Jan 22, 2024

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Jan 17, 2024

Version v0.44.0

Changed

  • #653: ECAL opcode handler can now hold internal state.
  • #657: Add debugger methods to remove or replace all breakpoints at once.

Breaking

  • #654: Make public types versionable by making non-exhaustive.
  • #658: Make key!-generated types like Address, AssetId, ContractId and Bytes32 consume one less byte when serialized with a binary serde serializer like postcard.

What's Changed

Full Changelog: v0.43.2...v0.44.0

@Dentosal Dentosal self-assigned this Jan 17, 2024
@Dentosal Dentosal requested a review from a team January 17, 2024 16:00
@Dentosal Dentosal enabled auto-merge January 17, 2024 16:12
MitchTurner
MitchTurner previously approved these changes Jan 17, 2024
@Dentosal Dentosal added this pull request to the merge queue Jan 17, 2024
@xgreenx xgreenx removed this pull request from the merge queue due to a manual request Jan 17, 2024
Copy link
Collaborator

@xgreenx xgreenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that the last change to serialization will not make the performance worse? Could you run simple benchmarks, please?=)

Plus we can remove BytesVisitor. Plus there is a bug with bincode serialization into the file, so maybe you also want to fix it=) It is how fix looks locally for BytesVisitor
image

@Dentosal
Copy link
Member Author

Plus there is a bug with bincode serialization into the file, so maybe you also want to fix it=)

What bug are we talking about? A performance bug?

@xgreenx
Copy link
Collaborator

xgreenx commented Jan 17, 2024

What bug are we talking about? A performance bug?

No, deserialization bug like here but for bincode.
#643

I think the same test with bincode should fail and the change on the screen fixes the issue

@Dentosal
Copy link
Member Author

I ran some benchmarks, and this is a performance regression. Sadly, there seems to be no way to avoid this if we want to get rid of the extra byte on Bytes32 serialization. Discussion here: serde-rs/serde#2120

We can revert here, but that means having to work around the extra byte in places where we'd rather have the performance penalty than the size penalty.

Benchmarks

Before

bincode Bytes32 [31.612 ns 31.707 ns 31.805 ns]
bincode Bytes64 [31.447 ns 31.507 ns 31.565 ns]
postcard Bytes32 [53.944 ns 54.058 ns 54.167 ns]
postcard Bytes64 [53.965 ns 54.094 ns 54.226 ns]

After

bincode Bytes32 [101.29 ns 101.40 ns 101.50 ns]
bincode Bytes64 [100.83 ns 100.88 ns 100.95 ns]
postcard Bytes32 [129.08 ns 130.31 ns 132.18 ns]
postcard Bytes64 [128.27 ns 128.37 ns 128.47 ns]

@Dentosal
Copy link
Member Author

Ok seems like it was a bad nightly version for benchmarking:

cargo 1.77.0-nightly (84976cd69 2024-01-12):

bincode Bytes32 [27.271 ns 27.322 ns 27.364 ns]
bincode Bytes64 [64.619 ns 64.670 ns 64.723 ns]
postcard Bytes32 [118.21 ns 118.27 ns 118.33 ns]
postcard Bytes64 [202.31 ns 202.52 ns 202.74 ns]

cargo 1.75.0 (1d8b05cdd 2023-11-20)

bincode Bytes32 [26.365 ns 26.391 ns 26.417 ns]
bincode Bytes64 [57.750 ns 57.816 ns 57.889 ns]
postcard Bytes32 [110.73 ns 110.92 ns 111.10 ns]
postcard Bytes64 [199.39 ns 199.60 ns 199.81 ns]

@Dentosal Dentosal requested a review from xgreenx January 17, 2024 23:51
xgreenx
xgreenx previously approved these changes Jan 22, 2024
xgreenx
xgreenx previously approved these changes Jan 22, 2024
@xgreenx xgreenx added this pull request to the merge queue Jan 22, 2024
Merged via the queue into master with commit db87869 Jan 22, 2024
37 checks passed
@xgreenx xgreenx deleted the dento/release-0.44.0 branch January 22, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants