Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: Re: Re: Assigning data to an array is slow..

by rbi (Monk)
on Mar 01, 2001 at 20:01 UTC ( #61576=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Assigning data to an array is slow..
in thread Assining data to an array is slow..

The benchmark result is confirmed for better performance of substr in the test above.
I've put $count = 100 and reduced the input file size. Now I don't get any warning, the improvement with method Three is evaluated to be about 25%:

Benchmark: timing 100 iterations of Method One, Method Three, Method T +wo... Method One: 7 wallclock secs ( 7.60 usr + 0.11 sys = 7.71 CPU) Method Two: 8 wallclock secs ( 7.83 usr + 0.11 sys = 7.94 CPU) Method Three: 6 wallclock secs ( 5.82 usr + 0.10 sys = 5.92 CPU)
About the benchmark... I felt more confortable with about 40 CPU seconds, even if there was a warning. With repeated iterations I think some time is taken by the call, while one call with a big file is better focussing on the array extraction. But it is just my feeling... :) I'd better study the Benchmark routines to evaluate this
ciao
Roberto


Comment on Re: Re: Re: Re: Re: Assigning data to an array is slow..
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-07-26 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (178 votes), past polls