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

test: speed up bitfield test slightly #869

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

EvanHahn
Copy link
Contributor

Speed up the test by about 1 second on my machine by making two changes:

Speed up the test by about 1 second on my machine by making two changes:

- Only create the blocks once, rather than on every loop.
- Use a byte buffer instead of a string to [skip string-to-buffer
  encoding][0]

[0]: https://github.com/holepunchto/hypercore/blob/16375ac22e87907b212c03d0e4a8e6b0a38f8c76/index.js#L957-L966
@EvanHahn EvanHahn merged commit 267fd69 into main Sep 26, 2024
6 checks passed
@EvanHahn EvanHahn deleted the speed-up-core-replication-stream-test branch September 26, 2024 12:32
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