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

Add helper functions that would create JournalInit from JournaledState #1879 #1961

Conversation

FredCoen
Copy link
Contributor

Resolves #1879

Copy link

codspeed-hq bot commented Dec 31, 2024

CodSpeed Performance Report

Merging #1961 will degrade performances by 2.13%

Comparing FredCoen:Add-helper-functions-that-would-create-JournalInit-from-JournaledState-#1879 (64272e4) with main (894bcfb)

Summary

❌ 1 regressions
✅ 7 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main FredCoen:Add-helper-functions-that-would-create-JournalInit-from-JournaledState-#1879 Change
`precompile bench ecrecover precompile` 198.4 µs 202.7 µs

pub type JournalInit = JournaledState<EmptyDB>;

impl<DB> From<&JournaledState<DB>> for JournalInit {
fn from(state: &JournaledState<DB>) -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

This is an expensive operation that clones a lot of fields. would remove it and just add into_init() and to_init() functions to JournaledState

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thx added that! so to_init() is still cloning similar to the rust from/into convention. I think that is what you wanted?

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

lgtm

@rakita rakita merged commit c28ea1b into bluealloy:main Jan 8, 2025
27 of 28 checks passed
This was referenced Jan 8, 2025
This was referenced Feb 4, 2025
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.

Add helper functions that would create JournalInit from JournaledState
2 participants