Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add generic single arg candiate of say back in
Speeds up say $_ for 1..2_000_000; by about 10x
  • Loading branch information
niner committed Aug 31, 2015
1 parent 0f8cdfb commit 994fb0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/io_operators.pm
Expand Up @@ -22,6 +22,11 @@ multi sub say(Str:D \x) {
my str $str = nqp::concat(nqp::unbox_s(x),$out.nl);
$out.print($str);
}
multi sub say(\x) {
my $out := $*OUT;
my str $str = nqp::concat(nqp::unbox_s(x.gist),$out.nl);
$out.print($str);
}
multi sub say(**@args is rw) {
my $out := $*OUT;
my str $str;
Expand Down

0 comments on commit 994fb0a

Please sign in to comment.