Bashkit benchmark run
vm-linux-x86_64 · 4 CPUs · 2026-09-02 18:17 UTC · 9bebbe7 · 96 cases × 10 iterations (warmup 2)
Bashkit vs bash, average per case
20.7×
0.539 ms vs 11.174 ms
Geometric mean speedup
29.8×
median 36.0×
Errors
0 / 0
bashkit / bash
Output match
100%
bashkit output equals bash
Speedup by category
Geometric mean of per-case speedup (bash mean ÷ bashkit mean). Hover a bar for totals.
Runners
| Runner | Total (ms) | Avg / case (ms) | Errors | Output match |
|---|---|---|---|---|
| bashkit in-process | 51.73 | 0.539 | 0 | 100.0% |
| bash subprocess | 1,072.71 | 11.174 | 0 | 100.0% |
Extremes
- Largest speedup
subshell_pipeline· 96.6× (0.050 ms vs 4.823 ms)- Smallest speedup
large_nested_loops· 1.2× (3.341 ms vs 3.951 ms)
All cases
| Case | bashkit mean (ms) | bash mean (ms) | Speedup | Iter | Match |
|---|---|---|---|---|---|
| startup | |||||
| startup_empty | 0.066 ±0.026 | 2.250 ±0.133 | 33.9× | 10 | ✓ |
| startup_true | 0.042 ±0.002 | 2.188 ±0.129 | 52.0× | 10 | ✓ |
| startup_echo | 0.045 ±0.004 | 2.339 ±0.301 | 52.5× | 10 | ✓ |
| startup_exit | 0.047 ±0.010 | 2.212 ±0.172 | 47.1× | 10 | ✓ |
| variables | |||||
| var_assign_simple | 0.085 ±0.030 | 2.403 ±0.211 | 28.4× | 10 | ✓ |
| var_assign_many | 0.117 ±0.012 | 2.267 ±0.174 | 19.3× | 10 | ✓ |
| var_default | 0.073 ±0.033 | 2.194 ±0.113 | 30.1× | 10 | ✓ |
| var_length | 0.052 ±0.006 | 2.425 ±0.208 | 47.1× | 10 | ✓ |
| var_substring | 0.065 ±0.021 | 2.290 ±0.173 | 35.2× | 10 | ✓ |
| var_replace | 0.052 ±0.003 | 2.298 ±0.106 | 44.0× | 10 | ✓ |
| var_nested | 0.058 ±0.010 | 2.325 ±0.187 | 40.4× | 10 | ✓ |
| var_export | 0.061 ±0.011 | 2.225 ±0.187 | 36.6× | 10 | ✓ |
| arithmetic | |||||
| arith_basic | 0.052 ±0.011 | 2.336 ±0.111 | 45.0× | 10 | ✓ |
| arith_complex | 0.070 ±0.030 | 2.289 ±0.144 | 32.6× | 10 | ✓ |
| arith_variables | 0.068 ±0.020 | 2.261 ±0.136 | 33.1× | 10 | ✓ |
| arith_increment | 0.065 ±0.024 | 2.156 ±0.110 | 33.1× | 10 | ✓ |
| arith_modulo | 0.085 ±0.019 | 2.107 ±0.150 | 24.7× | 10 | ✓ |
| arith_loop_sum | 0.118 ±0.030 | 2.263 ±0.109 | 19.2× | 10 | ✓ |
| control | |||||
| ctrl_if_simple | 0.054 ±0.010 | 2.280 ±0.121 | 42.2× | 10 | ✓ |
| ctrl_if_else | 0.063 ±0.013 | 2.233 ±0.163 | 35.5× | 10 | ✓ |
| ctrl_for_list | 0.087 ±0.019 | 2.464 ±0.247 | 28.4× | 10 | ✓ |
| ctrl_for_range | 0.106 ±0.028 | 2.496 ±0.327 | 23.7× | 10 | ✓ |
| ctrl_while | 0.183 ±0.021 | 2.934 ±1.228 | 16.0× | 10 | ✓ |
| ctrl_case | 0.086 ±0.009 | 2.257 ±0.185 | 26.2× | 10 | ✓ |
| ctrl_function | 0.080 ±0.028 | 2.308 ±0.233 | 28.7× | 10 | ✓ |
| ctrl_function_return | 0.102 ±0.020 | 2.940 ±0.312 | 28.8× | 10 | ✓ |
| ctrl_nested_loops | 0.147 ±0.043 | 2.591 ±0.274 | 17.7× | 10 | ✓ |
| strings | |||||
| str_concat | 0.050 ±0.004 | 2.334 ±0.205 | 47.1× | 10 | ✓ |
| str_printf | 0.051 ±0.009 | 2.604 ±0.302 | 51.1× | 10 | ✓ |
| str_printf_pad | 0.049 ±0.007 | 2.521 ±0.365 | 51.4× | 10 | ✓ |
| str_echo_escape | 0.063 ±0.010 | 2.343 ±0.169 | 37.1× | 10 | ✓ |
| str_prefix_strip | 0.063 ±0.015 | 2.718 ±0.450 | 43.4× | 10 | ✓ |
| str_suffix_strip | 0.090 ±0.015 | 2.529 ±0.222 | 28.2× | 10 | ✓ |
| str_uppercase | 0.050 ±0.009 | 2.436 ±0.349 | 48.6× | 10 | ✓ |
| str_lowercase | 0.049 ±0.004 | 2.881 ±0.327 | 59.0× | 10 | ✓ |
| arrays | |||||
| arr_create | 0.078 ±0.022 | 2.521 ±0.260 | 32.1× | 10 | ✓ |
| arr_all | 0.068 ±0.014 | 2.500 ±0.160 | 37.0× | 10 | ✓ |
| arr_length | 0.058 ±0.008 | 2.571 ±0.228 | 44.4× | 10 | ✓ |
| arr_iterate | 0.085 ±0.022 | 2.304 ±0.151 | 27.0× | 10 | ✓ |
| arr_slice | 0.057 ±0.004 | 2.575 ±0.343 | 45.3× | 10 | ✓ |
| arr_assign_index | 0.057 ±0.014 | 2.872 ±0.281 | 50.1× | 10 | ✓ |
| pipes | |||||
| pipe_simple | 0.107 ±0.017 | 5.046 ±0.295 | 47.3× | 10 | ✓ |
| pipe_multi | 0.118 ±0.032 | 5.383 ±0.377 | 45.5× | 10 | ✓ |
| pipe_command_subst | 0.064 ±0.013 | 2.930 ±0.309 | 45.5× | 10 | ✓ |
| pipe_heredoc | 0.070 ±0.016 | 4.686 ±0.381 | 66.9× | 10 | ✓ |
| pipe_herestring | 0.071 ±0.022 | 5.205 ±0.999 | 73.8× | 10 | ✓ |
| pipe_discard | 0.065 ±0.015 | 3.161 ±0.335 | 48.7× | 10 | ✓ |
| tools | |||||
| tool_grep_simple | 0.090 ±0.019 | 5.007 ±0.740 | 55.7× | 10 | ✓ |
| tool_grep_case | 0.219 ±0.029 | 4.758 ±0.192 | 21.7× | 10 | ✓ |
| tool_grep_count | 0.068 ±0.019 | 4.517 ±0.356 | 66.8× | 10 | ✓ |
| tool_grep_invert | 0.064 ±0.011 | 4.642 ±0.369 | 72.5× | 10 | ✓ |
| tool_grep_regex | 0.088 ±0.008 | 4.509 ±0.199 | 51.2× | 10 | ✓ |
| tool_sed_replace | 0.197 ±0.049 | 5.138 ±0.136 | 26.1× | 10 | ✓ |
| tool_sed_global | 0.182 ±0.057 | 4.929 ±0.405 | 27.1× | 10 | ✓ |
| tool_sed_delete | 0.057 ±0.011 | 4.627 ±0.164 | 80.6× | 10 | ✓ |
| tool_sed_lines | 0.062 ±0.019 | 4.843 ±0.286 | 78.1× | 10 | ✓ |
| tool_sed_backrefs | 0.276 ±0.056 | 5.223 ±0.495 | 18.9× | 10 | ✓ |
| tool_awk_print | 0.054 ±0.005 | 4.773 ±0.382 | 88.9× | 10 | ✓ |
| tool_awk_sum | 0.067 ±0.011 | 4.762 ±0.297 | 71.3× | 10 | ✓ |
| tool_awk_pattern | 0.132 ±0.052 | 4.537 ±0.266 | 34.4× | 10 | ✓ |
| tool_awk_fieldsep | 0.057 ±0.006 | 4.893 ±0.370 | 86.3× | 10 | ✓ |
| tool_awk_nf | 0.093 ±0.022 | 4.991 ±0.292 | 53.5× | 10 | ✓ |
| tool_awk_compute | 0.080 ±0.026 | 4.650 ±0.337 | 58.1× | 10 | ✓ |
| tool_jq_identity | 0.710 ±0.098 | 6.178 ±0.290 | 8.7× | 10 | ✓ |
| tool_jq_field | 0.701 ±0.055 | 6.457 ±0.413 | 9.2× | 10 | ✓ |
| tool_jq_array | 0.743 ±0.143 | 6.282 ±0.508 | 8.5× | 10 | ✓ |
| tool_jq_filter | 0.739 ±0.089 | 6.528 ±0.337 | 8.8× | 10 | ✓ |
| tool_jq_map | 0.694 ±0.081 | 7.752 ±1.149 | 11.2× | 10 | ✓ |
| complex | |||||
| complex_fibonacci | 5.761 ±0.381 | 114.7 ±5.873 | 19.9× | 10 | ✓ |
| complex_fibonacci_iter | 0.121 ±0.015 | 2.321 ±0.167 | 19.1× | 10 | ✓ |
| complex_nested_subst | 0.075 ±0.018 | 6.771 ±6.929 | 90.7× | 10 | ✓ |
| complex_loop_compute | 0.133 ±0.027 | 2.399 ±0.199 | 18.0× | 10 | ✓ |
| complex_string_build | 0.076 ±0.027 | 2.308 ±0.104 | 30.5× | 10 | ✓ |
| complex_json_transform | 0.725 ±0.099 | 6.436 ±0.569 | 8.9× | 10 | ✓ |
| complex_pipeline_text | 0.198 ±0.039 | 5.067 ±0.458 | 25.6× | 10 | ✓ |
| large | |||||
| large_loop_1000 | 4.874 ±0.368 | 5.897 ±0.663 | 1.2× | 10 | ✓ |
| large_string_append_100 | 0.401 ±0.042 | 2.720 ±0.227 | 6.8× | 10 | ✓ |
| large_array_fill_200 | 1.752 ±0.184 | 3.144 ±0.376 | 1.8× | 10 | ✓ |
| large_nested_loops | 3.341 ±0.454 | 3.951 ±0.410 | 1.2× | 10 | ✓ |
| large_fibonacci_12 | 15.6 ±1.114 | 325.4 ±30.4 | 20.9× | 10 | ✓ |
| large_function_calls_500 | 6.736 ±0.564 | 297.4 ±42.6 | 44.1× | 10 | ✓ |
| large_multiline_script | 0.473 ±0.042 | 2.776 ±0.160 | 5.9× | 10 | ✓ |
| large_pipeline_chain | 1.216 ±0.129 | 5.022 ±0.244 | 4.1× | 10 | ✓ |
| large_assoc_array | 0.079 ±0.052 | 2.221 ±0.125 | 28.3× | 10 | ✓ |
| subshell | |||||
| subshell_simple | 0.049 ±0.005 | 3.192 ±0.133 | 65.8× | 10 | ✓ |
| subshell_isolation | 0.077 ±0.019 | 2.820 ±0.195 | 36.5× | 10 | ✓ |
| subshell_nested | 0.113 ±0.018 | 4.958 ±0.380 | 43.8× | 10 | ✓ |
| subshell_pipeline | 0.050 ±0.002 | 4.823 ±0.261 | 96.6× | 10 | ✓ |
| subshell_capture_loop | 0.127 ±0.029 | 4.853 ±0.684 | 38.2× | 10 | ✓ |
| subshell_process_subst | 0.083 ±0.018 | 5.149 ±3.968 | 62.1× | 10 | ✓ |
| io | |||||
| io_redirect_write | 0.105 ±0.023 | 5.755 ±0.360 | 55.0× | 10 | ✓ |
| io_append | 0.103 ±0.014 | 5.551 ±0.401 | 53.8× | 10 | ✓ |
| io_dev_null | 0.088 ±0.021 | 2.254 ±0.223 | 25.5× | 10 | ✓ |
| io_stderr_redirect | 0.083 ±0.018 | 2.297 ±0.188 | 27.7× | 10 | ✓ |
| io_read_lines | 0.311 ±0.212 | 2.512 ±0.201 | 8.1× | 10 | ✓ |
| io_multiline_heredoc | 0.122 ±0.014 | 4.584 ±0.328 | 37.4× | 10 | ✓ |
System
- Hostname
- vm
- OS / arch
- linux / x86_64
- CPUs
- 4
- Runners
- bashkit, bash
- Prewarm cases
- 3
- Source file
crates/bashkit-bench/results/bench-vm-linux-x86_64-1788373049.json