Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^7: order of arguments evaluated

by kscaldef (Pilgrim)
on May 17, 2005 at 21:18 UTC ( [id://458003]=note: print w/replies, xml ) Need Help??


in reply to Re^6: order of arguments evaluated
in thread order of arguments evaluated

For a start, what if $a is a tied variable?

I added a "my". Now the compiler can determine that it isn't tied.

What happens to any benefits (which I seriously doubt exist) from maintaining cache coherency when it is sharing the cpu with say a browser charged with stretching or shrinking a .jpg that has been given badly chosen width/height attributes?

There are no browsers running on my servers. Moreover, I have control over everything that is running

Maintaining cache coherency can yield performance in processes that have uninterupted use of the processor, but in preemptive multitasking environnments those benefits derived by extremely laborious and careful hand coding or hugely complex analysis compilers are completely negated every 200ms (or similar) when the OS swaps tasks. Perl 5 has no way to realise such benefits.

In that 200ms, I may have served hundreds of requests. I'm quite willing to take an optimization that is useful on 99% of requests and doesn't hurt on the other 1%.

Replies are listed 'Best First'.
Re^8: order of arguments evaluated
by BrowserUk (Patriarch) on May 17, 2005 at 21:40 UTC
    I added a "my". Now the compiler can determine that it isn't tied.

    It could, but if the "compiler" is Perl5, it won't.

    I'm quite willing to take an optimization that is useful on 99% of requests

    You'll be waiting a long time for it if you are expecting your Perl scripts to benefit from it.

    What http server are you running? Does it use forking or threading? Either way, every inbound request is blowing any coherency in your cache.

    Are you shelling out to run your Perl scripts or using mod_perl? If the former, bang goes your cache every cgi request. If the latter, no benefits are possible unless you are only serving a single page.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 18:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found