Skip to content

Commit

Permalink
uintify Sequence.EXISTS/AT-POS
Browse files Browse the repository at this point in the history
For future performance
  • Loading branch information
lizmat committed Feb 13, 2022
1 parent 96cbc2b commit f807186
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/core.c/Sequence.pm6
Expand Up @@ -43,29 +43,21 @@ my role Sequence does PositionalBindFailover {
multi method List(::?CLASS:D:) { self.list.List }
multi method Slip(::?CLASS:D:) { self.list.Slip }

multi method Str(::?CLASS:D:) {
self.cache.Str
}

multi method Stringy(::?CLASS:D:) {
self.cache.Stringy
}

multi method Str(::?CLASS:D:) { self.cache.Str }
multi method Stringy(::?CLASS:D:) { self.cache.Stringy }
method Numeric(::?CLASS:D:) { self.cache.elems }

multi method AT-POS(::?CLASS:D: Int:D $idx) is raw {
multi method AT-POS(::?CLASS:D: uint $idx) is raw {
self.cache.AT-POS($idx)
}

multi method AT-POS(::?CLASS:D: int $idx) is raw {
multi method AT-POS(::?CLASS:D: Int:D $idx) is raw {
self.cache.AT-POS($idx)
}

multi method EXISTS-POS(::?CLASS:D: Int:D $idx) {
multi method EXISTS-POS(::?CLASS:D: uint $idx) {
self.cache.EXISTS-POS($idx)
}

multi method EXISTS-POS(::?CLASS:D: int $idx) {
multi method EXISTS-POS(::?CLASS:D: Int:D $idx) {
self.cache.EXISTS-POS($idx)
}

Expand Down

0 comments on commit f807186

Please sign in to comment.