Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Opti: avoid _heap.size reads#74

Merged
MathisGD merged 4 commits intomainfrom
perf/avoid-size-reads
Oct 15, 2022
Merged

Opti: avoid _heap.size reads#74
MathisGD merged 4 commits intomainfrom
perf/avoid-size-reads

Conversation

@MathisGD
Copy link
Copy Markdown
Collaborator

@MathisGD MathisGD commented Oct 12, 2022

Small optimization of HeapOrdering. See each commit as a separated optimization, we can keep each of them separately. My preferred one is the first one, the second and the first one adding a little bit of code.

See the results for updateHeap in TestRandomHeapOrdering:
Gas before: 21922
Gas after: 21811

Copy link
Copy Markdown
Collaborator

@QGarchery QGarchery left a comment

Choose a reason for hiding this comment

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

Let's go !

Copy link
Copy Markdown
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

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

Can you try it please? Else LGTM!

Copy link
Copy Markdown
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

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

LGTM

@MathisGD MathisGD merged commit 0cd396e into main Oct 15, 2022
@MathisGD MathisGD deleted the perf/avoid-size-reads branch October 15, 2022 14:09
@MathisGD MathisGD mentioned this pull request Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants