Skip to content
Permalink
Browse files

Make %h >>op<< %h about 30% faster

Because we don't need to go through creating Lists, but instead directly
use the iterator
  • Loading branch information...
lizmat committed Nov 16, 2018
1 parent 9a2c4b4 commit dc67ee75b109e2a1db17fc432079edbb58581a41
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/core/Hyper.pm6
@@ -372,7 +372,13 @@ class Hyper {

# actually handle 2 associatives
method !associatives(@keys, \left, \right) {
my \values := quietly self.infix(left{@keys}, right{@keys});
my \values := nqp::p6bindattrinvres(
nqp::create(List),List,'$!reified',
quietly self!iterators(
Rakudo::Iterator.AssociativeIterableKeys(left, @keys),
Rakudo::Iterator.AssociativeIterableKeys(right,@keys),
)
);
if $!assigns {
left
}

0 comments on commit dc67ee7

Please sign in to comment.
You can’t perform that action at this time.