2 ms·
Anybody know if it's possible to build a bash without unicode/locale support? The majority of the difference in bash/dash speed is erased by setting LC_ALL=C,
by aidenn0 3y ago
Anybody know if it's possible to build a bash without unicode/locale support? The majority of the difference in bash/dash speed is erased by setting LC_ALL=C, but that, of course, will affect other programs as well.
I tried with --disable-translatable-strings and got a modest speedup; --disable-multibyte failed to compile, and I didn't see any other obvious options to try.
[edit] Runs below:
$ hyperfine -N "dash -c exit"
Benchmark 1: dash -c exit
Time (mean ± σ): 0.8 ms ± 0.0 ms [User: 0.4 ms, System: 0.3 ms]
Range (min … max): 0.7 ms … 1.1 ms 3011 runs
Warning: The first benchmarking run for this command was significantly slower than the rest (1.0 ms). This could be caused by (filesystem) caches that were not filled until after the first run. You should consider using the '--warmup' option to fill those caches before the actual benchmark. Alternatively, use the '--prepare' option to clear the caches before each timing run.
$ hyperfine -N "bash -c exit"
Benchmark 1: bash -c exit
Time (mean ± σ): 4.6 ms ± 0.2 ms [User: 3.3 ms, System: 1.2 ms]
Range (min … max): 4.3 ms … 5.3 ms 596 runs
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
$ LC_ALL=C hyperfine -N "bash -c exit"
Benchmark 1: bash -c exit
Time (mean ± σ): 1.7 ms ± 0.0 ms [User: 0.7 ms, System: 0.9 ms]
Range (min … max): 1.6 ms … 2.1 ms 1446 runs
Warning: The first benchmarking run for this command was significantly slower than the rest (2.1 ms). This could be caused by (filesystem) caches that were not filled until after the first run. You should consider using the '--warmup' option to fill those caches before the actual benchmark. Alternatively, use the '--prepare' option to clear the caches before each timing run.