Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Speed up hash initialization loop

by austinj (Acolyte)
on Jan 30, 2013 at 14:12 UTC ( #1016063=note: print w/replies, xml ) Need Help??


in reply to Re: Speed up hash initialization loop
in thread Speed up hash initialization loop

Thanks for the advice, I'm pretty sure the regex runs pretty quick - the reason being if I only run a couple profiles (20) the whole routine runs at 0.07 seconds per profile. However if I run a large number (300+) it slows down to ~1.0 seconds per profile (average). I assume this means that something with initializing/re-allocating memory to the hash is what is slowing me down, not the regex.

Either way I took your advice and removed some unnecessary parts of the regex. But it still runs at approx the same speed.

  • Comment on Re^2: Speed up hash initialization loop

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016063]
help
Chatterbox?
[Corion]: On the upside, besides $work yesterday I got to enjoy the existing test suite for my WWW::Mechanize modules, as that makes implementing WWW::Mechanize:: Chrome much easier. Pick a feature I want to work on, copy the test, make that test pass (or modify ...
[shmem]: ☕☕ coffee for Discipulus and Corion. Sugar, milk?
[Corion]: ... the test suite because it reaches too deep into the objects)
[Corion]: shmem: Ooh, thanks! I already brought me an espresso+chocolate :)
[Discipulus]: mmh.. stil wrong
[Discipulus]: no sugar no milk, thanks; black short eatalian coffe
[Corion]: "corto" ;)
[Discipulus]: while (readdir DIR) was wrong too; it is while ($_ = readdir DIR)
[Corion]: Discipulus: I have to admit that nowadays I either use Path::Class or use File::Find or simply File::Glob:: bsd_glob to read a directory, depending on how fancy my needs are

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2017-05-26 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?