Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to make this substitutions without splitting the strings? (compute not reckon)

by Anonymous Monk
on Jul 28, 2014 at 09:37 UTC ( [id://1095316]=note: print w/replies, xml ) Need Help??


in reply to How to make this substitutions without splitting the strings?

The problem is that I have a very large file of such cases and split would be rather slow I reckon. Any faster way maybe?

Don't reckon, compute :)

What size is "very large file"?

Split is bound to faster , matching (or substituting) on large strings is slow in perl, for example, matching against a 30mb string might take 10 minute, while splitting the string and then matching (30mb array) takes 3 seconds

Test it out :) Re^3: Increasing the efficiency of a viral clonal expansion model , Re: Print in loop or store and print once done (bench)

  • Comment on Re: How to make this substitutions without splitting the strings? (compute not reckon)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1095316]
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 2024-04-19 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found