Skip to content

optimize: avoid insert into Vec; use into_iter for less derefer…#3102

Merged
antiochp merged 1 commit into
mimblewimble:masterfrom
aurexav:mmr-optimization
Oct 29, 2019
Merged

optimize: avoid insert into Vec; use into_iter for less derefer…#3102
antiochp merged 1 commit into
mimblewimble:masterfrom
aurexav:mmr-optimization

Conversation

@aurexav
Copy link
Copy Markdown
Contributor

@aurexav aurexav commented Oct 29, 2019

  • avoid insert into Vec
  • use into_iter for less dereference

Copy link
Copy Markdown
Member

@antiochp antiochp left a comment

Choose a reason for hiding this comment

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

👍

res.insert(0, rhs);
res.push(rhs);
}
res.reverse();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice. Good catch. 👍

@antiochp antiochp merged commit a39ff54 into mimblewimble:master Oct 29, 2019
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