Skip to content

Use smallvec for bitvec for heapless attns#2182

Closed
paulhauner wants to merge 1 commit intounstablefrom
attn-smallvec
Closed

Use smallvec for bitvec for heapless attns#2182
paulhauner wants to merge 1 commit intounstablefrom
attn-smallvec

Conversation

@paulhauner
Copy link
Member

Issue Addressed

NA

Proposed Changes

Use SmallVec<[u8; 32]> for BitVec so that Attestation objects require zero heap allocations.

Additional Info

TBC

@paulhauner paulhauner added the work-in-progress PR is a work-in-progress label Feb 1, 2021
@michaelsproul michaelsproul changed the base branch from stable to unstable February 8, 2021 04:33
@paulhauner
Copy link
Member Author

I'm going to close this since I couldn't observe any measurable difference in CPU or memory usage. It seems like a nice change from a "mechanical sympathy" perspective, but I'm just not convinced it's worth it.

@paulhauner paulhauner closed this Mar 1, 2021
@paulhauner paulhauner deleted the attn-smallvec branch March 29, 2021 06:45
paulhauner added a commit to paulhauner/lighthouse that referenced this pull request Apr 13, 2021
commit 7f62b7c
Author: Paul Hauner <[email protected]>
Date:   Mon Feb 1 11:23:58 2021 +1100

    Use smallvec for bitfield
paulhauner added a commit to paulhauner/lighthouse that referenced this pull request Apr 14, 2021
commit 7f62b7c
Author: Paul Hauner <[email protected]>
Date:   Mon Feb 1 11:23:58 2021 +1100

    Use smallvec for bitfield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

work-in-progress PR is a work-in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant