Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by swl (Prior)
on Jan 23, 2024 at 08:11 UTC ( [id://11157183]=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 Anonymous Monk post in 11157181 made me wonder if the the memory usage pattern changed with perl versions.

Running against the most recent releases of Strawberry Perl for each major version, the memory usage is low for perls prior to 5.20. From 5.20 (tested with 5.20.3) it shows the large usage pattern.

5.20 is when COW was first on by default. https://metacpan.org/release/RJBS/perl-5.20.0/view/pod/perldelta.pod#Performance-Enhancements

FWIW, the in-memory loop runs faster than the file-read loop for Strawberry Perls 5.16 and 5.18, and then becomes slower after 5.20. The difference is just not so large on non-MSYS2 and Cygwin perls.

  • 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 Danny (Chaplain) on Jan 23, 2024 at 09:26 UTC
    swl et. al. For consistency, if you want to run my file you can get it at tmp.txt. Not sure if there is another way to share files here.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2026-03-06 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    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.