Memory Management Overhead

Source code: oil/benchmarks/gc.sh

GC Stats

task elapsed ms max gc millis total gc millis allocated MB max rss MB num allocated num gc points num gc done gc threshold num growths max survived shell label
parse.configure-coreutils 1,581 0 0 84.6 132.7 2,401,934 4,764 8 2,217,494 7 1,108,747 osh-native
parse.abuild 41 0 0 5.1 13.1 149,684 180 2 155,134 1 77,567 osh-native
ex.compute-fib 226 0 0 304.8 25.5 1,583,069 4,504 15 100,000 0 1,143 osh-native
ex.bashcomp-parse-help 470 0 0 279.8 22.2 1,975,110 1,741 20 100,000 0 2,678 osh-native
ex.abuild-print-help 51 0 0 8.5 15.0 178,908 170 2 154,122 1 77,061 osh-native

Resource Usage

parse.configure-coreutils

Parsing the autoconf-generated configure script from GNU coreutils.

Note that unlike other shells, osh -n retains all nodes on purpose. (See the parser benchmark).

elapsed ms user ms sys ms max rss MB shell label shell runtime opts
119 119 0 3.8 bash -
17 13 4 1.8 dash -
218 151 74 4.2 zsh -
154 111 44 115.2 bumpleak/osh_eval mut
267 214 53 134.2 osh-native mut+alloc
385 329 56 134.3 osh-native mut+alloc+free
1,581 1,513 68 132.7 osh-native mut+alloc+free+gc
1,787 1,739 48 132.6 osh-native mut+alloc+free+gc+exit

parse.abuild

Parsing abuild from Alpine Linux.

elapsed ms user ms sys ms max rss MB shell label shell runtime opts
6 6 0 3.4 bash -
1 1 0 1.8 dash -
5 3 2 4.0 zsh -
8 4 4 11.2 bumpleak/osh_eval mut
14 11 4 12.3 osh-native mut+alloc
18 15 4 12.3 osh-native mut+alloc+free
41 32 8 13.1 osh-native mut+alloc+free+gc
43 31 12 13.0 osh-native mut+alloc+free+gc+exit

ex.compute-fib

A synthetic benchmark for POSIX shell arithmetic.

elapsed ms user ms sys ms max rss MB shell label shell runtime opts
39 39 0 3.4 bash -
10 10 0 1.7 dash -
20 20 0 4.0 zsh -
126 73 53 197.7 bumpleak/osh_eval mut
260 136 124 341.0 osh-native mut+alloc
312 192 120 341.0 osh-native mut+alloc+free
226 222 4 25.5 osh-native mut+alloc+free+gc
233 225 8 25.4 osh-native mut+alloc+free+gc+exit

ex.bashcomp-parse-help

A realistic bash-completion workload.

elapsed ms user ms sys ms max rss MB shell label shell runtime opts
187 187 0 3.7 bash -
256 160 96 198.5 bumpleak/osh_eval mut
447 323 124 327.1 osh-native mut+alloc
515 367 148 327.2 osh-native mut+alloc+free
470 442 28 22.2 osh-native mut+alloc+free+gc
446 426 20 22.0 osh-native mut+alloc+free+gc+exit

ex.abuild-print-help

Running abuild -h from Alpine Linux.

elapsed ms user ms sys ms max rss MB shell label shell runtime opts
15 15 0 4.9 bash -
6 6 1 4.1 dash -
12 4 9 4.3 zsh -
17 18 0 13.9 bumpleak/osh_eval mut
26 24 4 16.6 osh-native mut+alloc
36 29 8 16.9 osh-native mut+alloc+free
51 43 8 15.0 osh-native mut+alloc+free+gc
57 53 5 15.1 osh-native mut+alloc+free+gc+exit