HomeFreeBSD

Optimize f_sprintf() for bash

Description

Optimize f_sprintf() for bash

bash lacks the ksh93 optimization that makes sub-shells fast if they do
not alter io. bash 3.1-alpha1 introduced printf -v var_to_set which is not
as fast but is still significantly faster than var_to_set=$( printf ) when
using any version of bash. If we find our interpreter to somehow be bash
by invocation or inclusion, use the feature that provides fastest results.

Details

Provenance
dteskeAuthored on
Parents
rS295100: Reset OPTIND to 1 in f_device_find()
Branches
Unknown
Tags
Unknown