Skip to content

Commit

Permalink
Give 1dimmed arrays its own .kv
Browse files Browse the repository at this point in the history
Makes it 7x faster
  • Loading branch information
lizmat committed Nov 6, 2016
1 parent ed36e60 commit 608de26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Shaped1Array.pm
Expand Up @@ -145,6 +145,10 @@
Seq.new(
Rakudo::Internals.IntRangeIterator(0,self.shape.AT-POS(0) - 1))
}
multi method kv(::?CLASS:D:) {
Seq.new(
Rakudo::Internals.IterateKeyValueFromIterator(self.iterator))
}

method iterator(::?CLASS:D:) {
class :: does Iterator {
Expand Down

0 comments on commit 608de26

Please sign in to comment.