Re: Speeding question, " vs '



jodleren wrote:
Hi!

It just crossed my mind, that I usually do it like this:

$whatver=$_POST["returned_value"];

instead of

$whatver=$_POST['returned_value'];

The latter should be faster, as within ' nothing is replaced as in ".
I now wornder, what difference this makes in speed?
It should make some, but not really.... then again, with 10000000
users, it might.

What do you do?

The difference is too small to care about - even with 10M Users.

I can't say whats faster because the difference is so small that if i iterate both methods 10M times the result get corrupted by external factors like if there are other tasks that "steal" cpu time.

From the logical point of view single quotes should be faster because single quotes don't support varibale substitution.

Personally i use double quotes all the time.

Joe
.



Relevant Pages

  • Re: input of complex number
    ... You can do that if you don't mind some algebraic goings-on. ... The single quotes are still there but don't appear on the stack. ... I allways forget about the trignometric expression. ...
    (comp.sys.hp48)
  • Re: input of complex number
    ... How can I use variables for the absolute value and the argument of a ... You can do that if you don't mind some algebraic goings-on. ... The single quotes are still there but don't appear on the stack. ...
    (comp.sys.hp48)
  • Re: Report Heading Parameter Look-up
    ... Never mind, I figured it out...I was not putting the 103 in single quotes! ... > The underlying query already has an outer join so I'd have to do several ...
    (microsoft.public.access.reports)
  • Re: Quick sed question -- thanks
    ... Please keep in mind that this is just a first pass attempt to help you ... The thing that jumps out at me from your 'snippet' is that the single ... interpreter expanding/replacing the $LINENO variable. ... This will cause those single quotes to be interpreted as ...
    (comp.unix.shell)