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

perf(nns): Read heap neurons for cardinalities #3103

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

jasonz-dfinity
Copy link
Contributor

Why

The method with_active_neurons_iter is much more expensive than reading heap_neurons directly. In the context of neuron data validation, it's unnecessary to use with_active_neurons_iter since it reads both heap and stable memories. In other words, it reads heap_neurons not for "active neurons" but really just the neurons in the heap.

What

Revert to using heap_neurons_iter and update benchmarks

@jasonz-dfinity jasonz-dfinity requested a review from a team as a code owner December 11, 2024 01:12
@github-actions github-actions bot added the perf label Dec 11, 2024
Base automatically changed from jason/NNS1-3475-1 to master December 11, 2024 23:59
@jasonz-dfinity jasonz-dfinity added this pull request to the merge queue Dec 12, 2024
Merged via the queue into master with commit 09fa8e6 Dec 12, 2024
25 checks passed
@jasonz-dfinity jasonz-dfinity deleted the jason/NNS1-3475-2 branch December 12, 2024 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants