Newline

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fletch

    #16
    Re: Newline

    xhtml - <br />

    Comment

    • Andy Jeffries

      #17
      Re: Newline

      On Thu, 13 Apr 2006 21:30:57 +0000, Carl Vondrick wrote:[color=blue][color=green]
      >> Anyway, my point was - undeniably faster, but how much so...  Anyone
      >> got numbers?[/color]
      > In large numbers, it is significant. Ran under Kubuntu Linux with PHP
      > 5.1.2 with 1GB RAM and 3.2Ghz processor:
      >
      > Output:
      > S Diff: 11.428... (single quotes)
      > D Diff: 19.623... (double quotes)[/color]

      OK, something's awry!

      I'm running on a 4800+ X2 (although running a script like this will
      effectively only use a single 2.4GHz processor with a 1MB cache) using
      PHP 5.1.2 on Gentoo (desktop) and I get the following output:

      S Diff: 1.131... (keeping your level of precision)
      D Diff: 1.109... (keeping your level of precision)

      This shows that double quotes are faster?!

      I'll happily post a video of it happening if anyone disbelieves the
      results... I haven't modified the script (except to take out the extra
      two } that cause syntax errors).
      [color=blue]
      > So, single quotes wins hands down. To compare echo vs print:
      >
      > Output:
      > E Diff: 12.626... (echo)
      > P Diff: 15.637... (print)[/color]

      E Diff: 1.096...
      P Diff: 1.128...

      OK, here my results agree with yours (although mine only has it 3% faster
      not the 24% yours shows).

      Anyway, if the server can throw out 100,000 (near as damn it) prints
      (which is way more than any sane script would do) in a second using either
      the fastest or slowest method +/-3% then I'll stick to my normal method.

      However, are my results unique. Can anyone else run this test besides me
      and Carl so I can see if I've got a mean, lean (and unique) PHP machine :-)

      Cheers,


      Andy


      --
      Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
      http://www.gphpedit.org | PHP editor for Gnome 2
      http://www.andyjeffries.co.uk | Personal site and photos

      Comment

      Working...