Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re (tilly) 1: Assining data to an array is slow..

by tilly (Archbishop)
on Mar 01, 2001 at 03:23 UTC ( #61463=note: print w/replies, xml ) Need Help??


in reply to Assining data to an array is slow..

The reason for the slow-down is that the first time you are calling unpack in scalar (well really void) context so it is only extracting one field, while the second time you are extracting all of the fields. So Perl is doing a lot more work.

Now I have seen a couple of signs that unpack might not as fast as it could be. But I would need to look at it closely to figure out why. (Or even if that is true.)

In any case I wouldn't worry about it. This isn't running interactively, is it? If not then wait until you are done and see if it is fast enough...

  • Comment on Re (tilly) 1: Assining data to an array is slow..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://61463]
help
Chatterbox?
[LanX]: 1234567890 1234567890 1234567890
[LanX]: so inserting own whitespace helps, ie. a JS warning on submit could help preventing problems
[LanX]:  last hour of cb doesn't break
[LanX]: 12345678901234- 123456789012345678 901234567890123456 789012345678901234 567890123456789012 345678901234567890 123456789012345678 901234567890123456 789012345678901234 567890123456789012 345678901234567890 123456789012345678 901234567890123456 789012345678901234 567890

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-07-24 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (351 votes). Check out past polls.