-
Notifications
You must be signed in to change notification settings - Fork 332
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
feat: benchmark some python script #1356
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license-eye has totally checked 888 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
683 | 1 | 204 | 0 |
Click to see the invalid file list
- src/script/benches/py_benchmark.rs
Codecov Report
@@ Coverage Diff @@
## develop #1356 +/- ##
===========================================
+ Coverage 85.49% 86.04% +0.55%
===========================================
Files 514 523 +9
Lines 77471 78396 +925
===========================================
+ Hits 66230 67459 +1229
+ Misses 11241 10937 -304 |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me. Except for the thread spawning part. I'm not sure if criterion will create a huge amount of new threads for us. Let's keep an eye on it after merging this PR.
Replace it with create a new |
What's the benchmark result? @discord9 Can you attach it to comment? |
Updated in desc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* test: bench rspy&pyo3 * docs: add TODO * api heavy * Update src/script/benches/py_benchmark.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * style: toml fmt * test: use `rayon` for threadpool * test: compile first, run later --------- Co-authored-by: Ruihang Xia <waynestxia@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Use criterion to benchmark RustPython/CPython Script, found out in heavy computation load, CPython is still better, and in api heavy computation, RustPython have basically same speed with CPython
Checklist
Benchmark Results
On a 11th Gen Intel(R) Core(TM) i5-11260H @ 2.60GHz within a WSL Ubuntu 20.04.5 LTS
Every script is first compiled, then run repeatly for ten times.
Not very good, even for CPython, only api heavy computation have a slightly acceptable perfermance, future optimizations: