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

benchmark single list vs iterator for active fps (DNM) #307

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KonradStaniec
Copy link
Collaborator

Compare storing active finality provider as list with iterator vs as list in db;

Results for 80fps (on my machine):

80 FInality Providers
Get all finality providers
Old: 20243087 ns/op
New: 19692 ns/op // 3 orders of magnitude faster

Get one finality provider
Old: 1072 ns/op
New: 7441 ns/op // 7 times slower

I am still not sure whether all data is flushed from memory to the disk, but in setup I do:

  • commit which should flush the data from memory to the goleveldb
  • write pretty large array to goleveldb which should flush internal lsm memtable to the disk

@KonradStaniec KonradStaniec requested a review from a team as a code owner November 28, 2024 07:36
@KonradStaniec KonradStaniec requested review from RafilxTenfen and samricotta and removed request for a team November 28, 2024 07:36
@KonradStaniec KonradStaniec marked this pull request as draft November 28, 2024 07:36
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.

1 participant