in reply to Re^2: Producing a list of offsets efficiently
in thread Producing a list of offsets efficiently
In that case, I'd probably code up an XS module that makes two passes over the target string, allocating the result vector once after the first pass, and filling it in on the second.
In Section
Seekers of Perl Wisdom