shellbench icon indicating copy to clipboard operation
shellbench copied to clipboard

Add string manipulation benchmarks

Open debrouxl opened this issue 1 year ago • 0 comments

The goal of these benchmarks is to show that using builtins for simple, common string manipulation primitives is very much (two to three orders of magnitude) faster than having to work around the lack of said builtins using external processes. Overall, dash typically executes POSIX-compliant scripts faster than bash, and it's a good thing that e.g. Debian-derived distros use dash as /bin/sh by default; however, I've seen that bash-specific scripts using string manipulation builtins can end up being faster than POSIX-compliant scripts relying on comparatively slow sed / cut chains...

debrouxl avatar Jun 12 '24 10:06 debrouxl