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

chore: add basic benchmark script #3

Merged
merged 2 commits into from
Jan 30, 2024
Merged

chore: add basic benchmark script #3

merged 2 commits into from
Jan 30, 2024

Conversation

EvanHahn
Copy link
Contributor

npm run bench will create a million projects and tell you how long it takes.

This has no impact now but should make it easier to write benchmarks.
`npm run bench` will create a million projects and tell you how long it takes.
Copy link
Member

@achou11 achou11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! do you happen to know how the result is so far?

also curious about what other things are worth benchmarking later on e.g. other kinds of channels or implementations of a message channel

@EvanHahn
Copy link
Contributor Author

I tried running it a few times and on my machine, it's between 800ms and 900ms. Seems pretty fast, about 1.2 million calls per second.

(I imagine that's different on different devices, though!)

@EvanHahn
Copy link
Contributor Author

also curious about what other things are worth benchmarking later on e.g. other kinds of channels or implementations of a message channel

I agree. I imagine the message channel is the main bottleneck, but that's just a guess.

@EvanHahn EvanHahn merged commit d25dff5 into main Jan 30, 2024
9 checks passed
@EvanHahn EvanHahn deleted the benchmarks branch January 30, 2024 16:29
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