in reply to Are beheaded strings known to be slow?

first observation test1 operates directly on $str not $s

then you should measure how fast those substrs operate without the regex and if they really always deal with strings of the same length.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Are beheaded strings known to be slow?
by Anonymous Monk on Oct 09, 2025 at 18:13 UTC
    first observation test1 operates directly on $str not $s

    ouch, thanks, I blundered when making SSCCE, s/str/s/ doesn't make any difference