3 # All the tests in this file are ones that run exceptionally slowly
4 # (each test taking seconds or even minutes) in the absence of particular
5 # optimisations. Thus it is a sort of canary for optimisations being
8 # Although it includes a watchdog timeout, this is set to a generous limit
9 # to allow for running on slow systems; therefore a broken optimisation
10 # might be indicated merely by this test file taking unusually long to
11 # run, rather than actually timing out.
13 # This is similar to t/perf/speed.t but tests performance regressions specific
20 require Config; import Config;
22 skip_all_if_miniperl("No Scalar::Util under miniperl");
27 use Scalar::Util qw(tainted);
36 my $in = substr($ENV{PATH}, 0, 0) . ( "ab" x 200_000 );
38 ok(tainted($in), "performance issue only when tainted");
39 while ($in =~ /\Ga+b/g) { }
40 pass("\\G on tainted string");