on master help sign in
Add comparison benchmark
commit556149ad3a0a85c4139cfe3dafbab45cbb4c5443 authorsharkdp <davidpeter@web.de> dateMon 21 May 2018, 00:29 (8 years ago) parent33bbf25
1 file changed+23
tests/benchmarks/comparison.sh+23
tests/benchmarks/comparison.shnew file+23
@@ -0,0 +1,23 @@
1+if ! which hyperfine > /dev/null 2>&1; then
2+ echo "'hyperfine' does not seem to be installed."
3+ echo "You can get it here: https://github.com/sharkdp/hyperfine"
4+ exit 1
5+fi
6+
7+SRC="test-src/jquery-3.3.1.js"
8+
9+
10+cmd_bat="bat --style=full --color=always --paging=never '$SRC'"
11+cmd_pygmentize="pygmentize -g '$SRC'"
12+cmd_highlight="highlight -O truecolor '$SRC'"
13+cmd_ccat="ccat --color=always '$SRC'"
14+cmd_source_highlight="source-highlight --failsafe --infer-lang -f esc -i '$SRC'"
15+cmd_hicat="hicat '$SRC'"
16+
17+hyperfine --warmup 3 \
18+ "$cmd_bat" \
19+ "$cmd_pygmentize" \
20+ "$cmd_highlight" \
21+ "$cmd_ccat" \
22+ "$cmd_source_highlight" \
23+ "$cmd_hicat" \