-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
Execution order changes benchmark results #3766
Comments
Hi @snnsnn I can't produce those behaviors on my machine( |
I have previously asked the author of
He said. |
@yusukebe The runtime i used node v20.16.0 (x64-linux) with 16GB RAM, it is probably GC. The way I run the benchmarks is cd into It is probably GC related because I try to run the benchmark with deno v2.1.4, I ran out of memory:
With bun, the benchmark failed to execute due to error:
Edit: Updating bun to |
I am unable to reproduce them. So I cannot do anything regarding this issue. |
The import Benchmark from 'benchmark' |
@yusukebe Perhaps these tests could be migrated to the latest version of Additionally, using more realistic test cases and increasing the number of tests to better reflect real-world scenarios might yield more reliable results. I’m not sure if using On the topic of realistic data, some benchmarks use GitHub API paths for testing. For instance, this Rust-based example could provide useful paths: Matchit Benchmark. Extracting similar paths could enhance the relevance of the tests. At the moment, I’m on a tight schedule and don’t have in-depth knowledge of Hono’s routers. I came across these tests while searching for a fast router implementation in JavaScript. Please feel free to close the issue or keep it open in case someone else decides to tackle these improvements. Thank you for the great work on Hono! Best regards |
Hi @snnsnn |
Hi there! 👋
It appears that the execution order of items in the benchmark suite significantly impacts the reported outcomes. When running the same benchmark multiple times, the fastest library changes depending on the order in which the benchmarks are executed. Below are three separate runs of the
handle-event
benchmark, with varying results:Run 1
Run 2
Run 3
Libraries earlier in the execution order tend to perform better, while those executed later show significant performance degradation, likely due to resource constraints or runtime factors like garbage collection.
Could you consider implementing a solution to improve the accuracy and reliability of these benchmarks? It would ensure fair comparisons and provide more actionable performance insights.
Thank you!
The text was updated successfully, but these errors were encountered: