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

Re^3: Pls help optomize - ksh version 60% faster!

by davidrw (Prior)
on Sep 29, 2005 at 01:29 UTC ( [id://495958]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Pls help optomize - ksh version 60% faster!
in thread Pls help optomize - ksh version 60% faster!

Yes, you're right -- the hashing would be more efficient, though @rptType is used later in the code, so need to keep %seen in addition, or the later use might be able to be keys %seen instead of @rptType (unless order matters) .. or could just always push onto @rptType and throw out dups later (see tihs idiom, but destroys order)

As for matching with /$rptType/, y, that seems suspicious .. i too now suspect that it should be eq instead, but can't say for sure..

also, looking at this again, the first of my two lines is unnecessary -- it seemed at first that the author wanted a double push onto @rptType, but that's not the case.. I've ammended my post above..

anyways, ++ and thanks for double-checking my post!!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-18 07:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found