On Tue, 2023-06-13 at 11:07 +0200, Ulrich Mueller wrote:
> > > > > > On Tue, 13 Jun 2023, Michał Górny wrote:
>
> > _pypi_normalize_name() {
> > local name=${1}
> > - local shopt_save=$(shopt -p extglob)
> > - shopt -s extglob
> > + local prev_extglob=-s
> > + if ! shopt -p extglob
> On Tue, 13 Jun 2023, Michał Górny wrote:
> _pypi_normalize_name() {
> local name=${1}
> - local shopt_save=$(shopt -p extglob)
> - shopt -s extglob
> + local prev_extglob=-s
> + if ! shopt -p extglob >/dev/null; then
> + prev_extglob=-u
> +
Suggested by Eli Schwartz. This gives roughly 5260 ops / s, over 550%
speedup.
The complete patch series therefore increases the speed from roughly
326 ops / s to 5260 ops / s, making the common case 16 times faster.
Closes: https://bugs.gentoo.org/908411
Closes: