Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Idiomatic optimizations

by sfink (Deacon)
on May 01, 2002 at 01:55 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://163202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found