Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make Any.sum 2x faster still
  • Loading branch information
lizmat committed Nov 15, 2015
1 parent 6d97011 commit 01747cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/Any.pm
Expand Up @@ -414,9 +414,9 @@ my class Any { # declared in BOOTSTRAP
method sum() {
my \iter = self.iterator;
my $sum = 0;
until (my \value = iter.pull-one) =:= IterationEnd {
$sum := $sum + value;
}
my Mu $value;
$sum = $sum + $value
until ($value := iter.pull-one) =:= IterationEnd;
$sum;
}
}
Expand Down

0 comments on commit 01747cb

Please sign in to comment.