Re: faster than index?

2019-02-02 Thread ToddAndMargo via perl6-users
On 2/2/19 6:21 AM, Brad Gilbert wrote: `.index` is going to be the fastest because it is directly using NQP ops which are built into the VM. 'abcdefg'.index('de'); # 3 If you want all of the indexes, use `.indices` 'abcdefabc'.indices('abc'); # 0, 6 `.index` will return `Nil` if it

Re: faster than index?

2019-02-02 Thread Brad Gilbert
`.index` is going to be the fastest because it is directly using NQP ops which are built into the VM. 'abcdefg'.index('de'); # 3 If you want all of the indexes, use `.indices` 'abcdefabc'.indices('abc'); # 0, 6 `.index` will return `Nil` if it doesn't find anything, and `.indices` will