Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
New tests for azawawi++'s '1 == any(1..1000)' test (and scaling there…
…of), and loops optimized by sorear++ for Niecza
  • Loading branch information
Geoffrey Broadwell committed Dec 3, 2012
1 parent ac75337 commit e836e54
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions timeall
Expand Up @@ -224,6 +224,18 @@ my %TESTS = (
perl6 => 'my %h; my $i = 0; while (++$i <= 10000) { %h{ $i } = $i }',
nqp => 'my %h; my $i := 0; while ($i := $i + 1) <= 10000 { %h{ $i } := $i }',
},
{
name => 'postwhile_nil_1e5',
perl5 => 'my $i = -100000; () while ++$i;',
perl6 => 'my $i = -100000; Nil while ++$i;',
nqp => 'my $i := -100000; () while $i := $i + 1;',
},
{
name => 'loop_empty_1e5',
perl5 => 'for (my $i = 1; $i <= 100000; ++$i) { }',
perl6 => 'loop (my $i = 1; $i <= 100000; ++$i) { }',
nqp => undef,
},
{
name => 'for_empty_1e5',
perl5 => 'for (1 .. 100000) { }',
Expand Down Expand Up @@ -278,6 +290,18 @@ my %TESTS = (
perl6 => '[+] 1 .. 100000',
nqp => undef,
},
{
name => 'any_equals_1e3',
perl5 => undef,
perl6 => '1 == any(1 .. 1000)',
nqp => undef,
},
{
name => 'any_equals_5e3',
perl5 => undef,
perl6 => '1 == any(1 .. 5000)',
nqp => undef,
},
{
name => 'trim_string_1e3',
perl5 => 'my $s = " " x 1000 . "x" x 1000 . " " x 1000; /^\s*(.*?)\s*$/s for 1 .. 1000',
Expand Down

0 comments on commit e836e54

Please sign in to comment.