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.

Suite timing

Time to Start Worker time Duration Time to finish
Config 0s 3s 3s 3s
Eval 4s 2m24s 2m24s 2m28s
Build 1m24s 21m49s 6m05s 7m30s
Test - - - -
Deploy - - - -
Suite 0s 24m16s 7m30s 7m30s

Timeline

0s1m2m3m4m5m6m7m