-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improved benchmark suite #1953
Improved benchmark suite #1953
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.
Nice cleanup/improvement! This is certainly going to be useful in the near future.
Here is a comparison of current v0.18.3
|
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat |
46.7 ± 0.8 | 45.5 | 49.2 | 1.00 |
Plain-text speed
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … --language=txt numpy_test_multiarray.py |
49.6 ± 0.9 | 48.4 | 53.0 | 1.00 |
Syntax highlighting speed: grep-output-ansi-sequences.txt
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … grep-output-ansi-sequences.txt |
421.1 ± 9.6 | 410.7 | 439.2 | 1.00 |
Syntax highlighting speed: jquery.js
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … jquery.js |
682.9 ± 5.6 | 676.6 | 691.4 | 1.00 |
Syntax highlighting speed: miniz.c
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … miniz.c |
87.4 ± 1.6 | 85.9 | 93.1 | 1.00 |
Syntax highlighting speed: numpy_test_multiarray.py
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … numpy_test_multiarray.py |
897.1 ± 9.2 | 885.0 | 911.6 | 1.00 |
master
bat
benchmark results
Startup time
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat |
6.3 ± 0.3 | 5.6 | 7.8 | 1.00 |
Plain-text speed
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … --language=txt numpy_test_multiarray.py |
9.6 ± 0.3 | 8.8 | 11.0 | 1.00 |
Syntax highlighting speed: grep-output-ansi-sequences.txt
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … grep-output-ansi-sequences.txt |
389.2 ± 3.3 | 384.8 | 394.5 | 1.00 |
Syntax highlighting speed: jquery.js
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … jquery.js |
678.7 ± 5.1 | 673.0 | 689.1 | 1.00 |
Syntax highlighting speed: miniz.c
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … miniz.c |
91.5 ± 2.2 | 89.3 | 97.9 | 1.00 |
Syntax highlighting speed: numpy_test_multiarray.py
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
bat … numpy_test_multiarray.py |
907.8 ± 9.4 | 896.5 | 921.9 | 1.00 |
We could also add a script that can directly compare different versions. We have something similar for fd
and it's very helpful: sharkdp/fd#885 (comment)
In the spirit of #1751, this PR adds the possibility of creating a Markdown report from our "benchmark suite" (see exemplary output at the end of this post). It also cleans up the benchmark script and adds a couple of (hopefully) useful benchmarks. In particular, it adds a benchmark that should be able to demonstrate the effect of #1596.
I hope that this script can be used as a basis for future benchmarking work. It should be straightforward to extend it with more benchmarks.
bat
benchmark resultsStartup time
bat
Plain-text speed
bat … --language=txt numpy_test_multiarray.py
Syntax highlighting speed:
grep-output-ansi-sequences.txt
bat … grep-output-ansi-sequences.txt
Syntax highlighting speed:
jquery.js
bat … jquery.js
Syntax highlighting speed:
miniz.c
bat … miniz.c
Syntax highlighting speed:
numpy_test_multiarray.py
bat … numpy_test_multiarray.py