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)
|
|---|