Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: improving the efficiency of a script

by lima1 (Curate)
on Jun 18, 2006 at 17:48 UTC ( [id://556130]=note: print w/replies, xml ) Need Help??

in reply to Re: improving the efficiency of a script
in thread improving the efficiency of a script

I'm not sure how efficient (or otherwise) it is

Much better than OPs solution ;) but time and space requirements for the data preparation is still O(n). much more than 0(m * log(n)) and O(m), respectively (once again, for sorted dictionaries only).

So if dictionary is unsorted, the memory requirements are not a problem and if this task is not often repeated, yours is the best solution IMHO.

  • Comment on Re^2: improving the efficiency of a script

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-06-18 18:13 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.