Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add tests for three of the performance-related Rakudo commits
  • Loading branch information
Geoffrey Broadwell committed Nov 22, 2012
1 parent d5fed63 commit 4a9017c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TODO
Expand Up @@ -25,9 +25,9 @@
. commit 0fde4a1e375a26da8d7b511aafdb6174e934b757 (parsing)
. commit 2125adb2dc3f22f9fb877e3ea403d469037b729c (.map)
. commit d6cd1e2bd19e03a81132a23b2025920577f84e37 (FIRST/NEXT/LAST)
. commit c10792f88a46a975749b0f2aa1460c432dd16a67 (Array.at_pos, RT #111848)
. commit 29f5cf7ca1c547b543b1815a8528cc4ec8307419 (reductions: [+] 1..100000)
. commit 95371a6ec5f96563fff0ce9b9ae95a95bec16cf5 (Str.trim*)
. DONE: commit c10792f88a46a975749b0f2aa1460c432dd16a67 (Array.at_pos, RT #111848)
. DONE: commit 29f5cf7ca1c547b543b1815a8528cc4ec8307419 (reductions: [+] 1..100000)
. DONE: commit 95371a6ec5f96563fff0ce9b9ae95a95bec16cf5 (Str.trim*)
. commit 9fc3eb254f1d377bebd4f4f89adcec96848e7c3b (IO: .say for @some_list_of_strings)
. commit 7ac6d1ea6d8352696ca32b41080e75777ba5f9c2 (Buf creation and listification)
. commit af0d2e1d782f1172cf27cb64ad938b504c619dd1 (MapIter: for 1..1000000 { $i++ })
Expand Down
24 changes: 24 additions & 0 deletions timeall
Expand Up @@ -208,6 +208,30 @@ my %TESTS = (
perl6 => 'my @a; for (1 .. 1000) { push @a, 1 }',
nqp => undef,
},
{
name => 'for_array_set_1e4',
perl5 => 'my @a; $a[ $_ ] = $_ for 1 .. 10000',
perl6 => 'my @a; @a[ $_ ] = $_ for 1 .. 10000',
nqp => undef,
},
{
name => 'for_hash_set_1e4',
perl5 => 'my %h; $h{ $_ } = $_ for 1 .. 10000',
perl6 => 'my %h; %h{ $_ } = $_ for 1 .. 10000',
nqp => undef,
},
{
name => 'reduce_range_1e5',
perl5 => 'use List::Util "reduce"; reduce { $a + $b } 1 .. 100000',
perl6 => '[+] 1 .. 100000',
nqp => undef,
},
{
name => 'trim_string_1e3',
perl5 => 'my $s = " " x 1000 . "x" x 1000 . " " x 1000; /^\s*(.*?)\s*$/s for 1 .. 1000',
perl6 => 'my $s = " " x 1000 ~ "x" x 1000 ~ " " x 1000; $s.trim for 1 .. 1000',
nqp => undef,
},
],
f => [
{
Expand Down

0 comments on commit 4a9017c

Please sign in to comment.