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

JournalDB.latest_id speedup #1772

Merged
merged 1 commit into from
May 3, 2019

Conversation

carver
Copy link
Contributor

@carver carver commented May 2, 2019

A mainnet test previously showed this method took 7.0% of the total
import_block() time. After this change it was 0.6% of the total.

Tested against blocks: (7620447, 7620450, 7620453, 7620454)

How was it fixed?

OrderedDict docs say that __reversed__ is natively supported, so I took a shot at first(reversed(...keys())) and that gave a significant speedup.

Cute Animal Picture

put a cute animal picture link inside the parentheses

A mainnet test previously showed this method took 7.0% of the total
import_block() time. After this change it was 0.6% of the total.

Tested against blocks: (7620447, 7620450, 7620453, 7620454)
@carver carver requested a review from cburgdorf May 2, 2019 23:13
Copy link
Contributor

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

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

Sweeet 🔥

@carver carver merged commit 23c8a80 into ethereum:master May 3, 2019
@carver carver deleted the journal-latest-id-speedup branch May 3, 2019 17:41
carver added a commit that referenced this pull request May 3, 2019
carver added a commit that referenced this pull request May 20, 2019
* Add release notes for PR #1716

* Add release notes for PR #1751

* Add release notes for PR #1747

* Release notes for #1735

* Add release notes for #1765 and #1766

* Add release notes for #1764

Also add notes on performance gains

* Add release notes for #1770 #1771 #1772

* Add release notes for #1776

* Add release notes for #1773

* Add release notes for #1777

* Add release notes for #1778
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.

2 participants