in reply to Re: A Luser's Benchmarking Tale
in thread A Luser's Benchmarking Tale

Hmm, well I take your point (and I had tested with $val=1 - see original post), but nevertheless it strikes me as damning with faint praise ;)

What you're basically saying is that labels can be faster than multiple ifs provided you have enough conditions and you make them slow enough (e.g. regex)

Given that multiple ifs are a pretty stoopid thing to do (I only used them in my benchmark for comparison purposes), this is hardly a glowing recommendation for labels.

BTW I rewrote my test script to use $ARGV[0] for $val, and ran it with val=1 and val=4 for both versions (== and =~). Here are the results (which confirm your observation) 9kb gif of graph

Tom Melly, tom@tomandlu.co.uk