Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Speed up calling P6 methods a bit
Getting rid of the intermediary array saves about 4 % in csv-ip5xsio.pl
  • Loading branch information
niner committed Sep 29, 2016
1 parent 4cb9b18 commit 61473e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Inline/Perl5.pm6
Expand Up @@ -1284,8 +1284,6 @@ method BUILD(*%args) {
&!call_method = sub (Int $index, Str $name, Int $context, Pointer $args, Pointer $err) returns Pointer {
my $p6obj = $objects.get($index);
$!scalar_context = ?$context;
my @retvals = $p6obj."$name"(|self.p5_array_to_p6_array($args));
return self.p6_to_p5(@retvals);
CONTROL {
when CX::Warn {
note $_.gist;
Expand All @@ -1298,6 +1296,7 @@ method BUILD(*%args) {
return Pointer;
}
}
self.p6_to_p5($p6obj."$name"(|self.p5_array_to_p6_array($args)).list);
}
&!call_method does Perl5Caller;

Expand Down

0 comments on commit 61473e4

Please sign in to comment.