5f115023

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Fix exponential-time blowup in many/some parsing

A parser shaped like

    choice [some argument, many --filter] <*> many --opt1 <*> many --opt2

scales exponentially in the number of @--opt2@ values when there are
also many @--opt1@ values: every added @--opt2@ multiplies total parse
time by ~3x. Originally hit by a sydtest mutation suite invocation with
6 @--mutation@ + 6 @--mutation-suite-exe@ flags taking >30 seconds of
CPU just to parse settings.
completion-bashcompletion-bash-enrichedcompletion-fishcompletion-zshcoverage-reportexample-settings-checkexample-settings-check-without-capabilityforwardCompatibilitynixpkgs-23_11nixpkgs-24_05nixpkgs-24_11nixpkgs-25_05pre-commitreleaseshellconfiguredevShelldefaultx86_64-linux