Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Are beheaded strings known to be slow?

by LanX (Saint)
on Oct 09, 2025 at 18:05 UTC ( [id://11166451]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11166451]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2025-11-17 10:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.