On Sunday, May 19, 2002, at 02:30 , Ross Esposito wrote:

> I "think" split is compiled only once while regex (as used in the previous
> posts) is compiled everytime a new line is to be matched. (you can use qr/
> /)
>
> Someone fire up Benchmark. I could be wrong :)
>
> xgunnerx

funny you should ask this:

http://www.wetware.com/drieux/pbl/BenchMarks/hashCompareSplitReg.txt

http://www.wetware.com/drieux/pbl/BenchMarks/spliVregForKeyVal.txt

what you are 'suppose' to do is

        /<RegExHere/o

for the directive to the compiler to compile it once.

What I feel firmly safe in saying, without a doubt,
and with full certainty of mind...

If you do your data model right, opt for hashes where
appropriate, and use RegEx - you can do well.

While you can make a complete bollock of it if you
do certain classes of scoping sillies for when and how
you allocate your 'use and throw away' variables...

the delta between the 'For' and 'ForOut' is whether
you declare the 'my ($key,$val)' inside the loop
to catch from the split - or outside...

Granted this is ONLY a test for the case of some 3699
key value pairs....


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to