Skip to content

Reduce number of allocations in Headers message read#3301

Merged
antiochp merged 1 commit into
mimblewimble:masterfrom
cyclefortytwo:alloc-proto-headers
Apr 18, 2020
Merged

Reduce number of allocations in Headers message read#3301
antiochp merged 1 commit into
mimblewimble:masterfrom
cyclefortytwo:alloc-proto-headers

Conversation

@hashmap
Copy link
Copy Markdown
Contributor

@hashmap hashmap commented Apr 17, 2020

We allocate 17 vectors (in the heap) per 512 headers, this PR reduces the number to 1 by resuing the buffer for headers and eliminating the need in the vector of indices

We allocate 17 vectors (in the heap) per 512 headers, this PR reduces the number to 1 by resuing the buffer for headers and eliminating the need in the vector of indices
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.

Tested locally. Looks good.

👍

@antiochp antiochp merged commit e64e906 into mimblewimble:master Apr 18, 2020
@antiochp antiochp mentioned this pull request Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants