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

Optimize DHT components and methods #8

Merged
merged 6 commits into from
Jul 31, 2023
Merged

Optimize DHT components and methods #8

merged 6 commits into from
Jul 31, 2023

Conversation

cortze
Copy link
Owner

@cortze cortze commented Jul 28, 2023

Motivation

The current implementations seem to be working fine. However, it is far from being optimal (time-wise)

Related links:

Description

This PR aims to move away from the crapy plain python performance, using the collections and bitarray libraries

Tasks

  • implement bitarray at the lowest level of the hashes
  • add collection.deque() and collection.dicts
  • update tests
  • benchmark the results
  • add Makefile for the 3 different usecases (OPTIONAL but useful to install: package, tests, benchmarks)

Proof of Success

  • all test pass :)
  • there is an actual time benefit with this changes :)))
    -> there are time benefits (30% faster), but it still takes ~2h to bootstrap a network with 10k nodes

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