Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Performance problem with Clone Method

by Commandosupremo (Novice)
on Jul 26, 2011 at 23:19 UTC ( [id://916874]=note: print w/replies, xml ) Need Help??


in reply to Re: Performance problem with Clone Method
in thread Performance problem with Clone Method

Dave:

I made the change from the nested maps to a single map and it made a considerable improvement, thank you very much. I've never used the benchmark package, but I think I will start using it as well, its output looks more useful to me than SmallProf's.

  • Comment on Re^2: Performance problem with Clone Method

Replies are listed 'Best First'.
Re^3: Performance problem with Clone Method
by davido (Cardinal) on Jul 26, 2011 at 23:33 UTC

    Glad it helped. By the way, there's a module in the core distribution, Clone, which provides increased flexibility (it can handle datastructures of arbitrary shape) with its clone() function. However, it is actually considerably slower than even your first method. It's an example of where the increased abstraction that makes it a more useful tool all around also carries with it a performance impact.

    diotalevi has (or had perhaps) a module on CPAN, Clone::Fast, but when I went to install it with cpan Clone::Fast, the cpan utility couldn't find it. I would like to have tried benchmarking it.

    Another aside: Storable (also in the core distribution) offers dclone(), but according to the Clone documentation it's even slower, while being even more flexible.


    Dave

      I will be sure to give those modules a look over, I don't think they will help me much now (as I am only cloning the matrices), but they may in the future.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found