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

Allocation optimisations & Clippy cleanup #2

Conversation

michaelsproul
Copy link

Proposed Changes

I started trying to get the Clippy lints to pass and then I got a bit carried away. I ended up removing all indexing (which could panic) and unwraps. And I found a way to get rid of some intermediate collects by messing with the validity filters (making them safe to share between threads).

I also reversed the polarity of the hash_set_filter predicate, so that it matches Iterator::filter.

@GeemoCandama
Copy link
Owner

I always forget about clippy until the end sorry. Making validity_filter Fn and Sync makes the get_cliques function so much nicer. The AtomicUsize is a new one for me so I'll have to remember that.

@GeemoCandama GeemoCandama merged commit 50ab6c8 into GeemoCandama:bron_kerbosch_attestation_aggregation Nov 3, 2023
jimmygchen pushed a commit that referenced this pull request Nov 4, 2023
jimmygchen added a commit that referenced this pull request Nov 4, 2023
## Issue Addressed

sigp#4738 

## Proposed Changes

See the above issue for details. Went with option #2 to use the async reqwest client in `Eth2NetworkConfig` and propagate the async-ness.
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