Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: RE on lines read from in-memory scalar is very slow

by tonyc (Friar)
on Feb 21, 2024 at 00:01 UTC ( [id://11157822]=note: print w/replies, xml ) Need Help??


in reply to Re^4: RE on lines read from in-memory scalar is very slow
in thread RE on lines read from in-memory scalar is very slow

The regex engine currently always makes a CoW copy (ie doesn't copy the string itself) of the matched string.

There's no CoW substrings - perl's PVs are stored with a trailing NUL so they're useful as a C-style string, and perl itself and XS code depends on that, so I don't think it can be implemented in any case.

  • Comment on Re^5: RE on lines read from in-memory scalar is very slow

Replies are listed 'Best First'.
Re^6: RE on lines read from in-memory scalar is very slow
by NERDVANA (Curate) on Feb 21, 2024 at 00:10 UTC
    Ah-ha! Well that helps improve my understanding for future attempts at optimizing my scripts.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-05-29 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found