Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Idiomatic optimizations

by sfink (Deacon)
on May 01, 2002 at 01:55 UTC ( #163202=note: print w/ replies, xml ) Need Help??


in reply to Re: Idiomatic optimizations
in thread Idiomatic optimizations

What perl are you using? Those should be identical at runtime, since interpolation is converted to concatenation by the tokenizer. For evidence, try:

% perl -MO=Deparse -e '$foo=q(foo)' $foo = 'foo'; -e syntax OK % perl -MO=Deparse -e '$foo=qq(foo)' $foo = 'foo'; -e syntax OK
I ran your benchmark program, and got +/- 3%. Try running it a few times.


Comment on Re: Re: Idiomatic optimizations
Download Code
Re: Re: Re: Idiomatic optimizations
by BlueLines (Hermit) on May 01, 2002 at 03:14 UTC
    I was logged in remotely to my home machine when i ran this, which means that xscreensaver was running with 100% of my cpu (yay OpenGL). I ran the test again without xscreensaver and i got the same results you did. oh well.

    BlueLines

    Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.
Re: Re: Re: Idiomatic optimizations
by Sifmole (Chaplain) on May 01, 2002 at 12:06 UTC
    I wonder if the results have anything to do with you using q instead of a single quote and qq instead of double quotes.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2014-08-21 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (136 votes), past polls