Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

PHP performance tips

Loading...

Sign in or sign up now!
21,355
Loading...
Alert icon
Sign in or sign up now!
Alert icon
There is no Interactive Transcript.

Uploaded by on Jun 22, 2009

Learn how you can speed up your PHP scripts. For more information, visit http://code.google.com/speed

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 28 dislikes

Link to this comment:

Share to:

Top Comments

  • How to speed up ASP performance:

    Switch to PHP. :^P

  • even less than that, it's so infinitesimal that's it's not worth editing your code over. I'm actually disappointed Google posted this.

see all

All Comments (36)

Sign In or Sign Up now to post a comment!
  • This video its for someone as big as google!, this must be emailed to microsoft instead of make us watching it :D

  • apple

    

  • yeah thats ooo

    

  • Due to Rasmus Lerdorf single-qoutes doens't make your code run faster than double. It's just a myth.

  • @benjarriola Actually, in PHP, a while loop will run faster. But the gain is not significant at all(something such as 0.001 seconds for 100000 iterations...), so it's not worth changing all your for loops for while in your scripts

  • @realluinnar Wrong. At that point, you're going into load-balancing, DB tuning and caching of all sorts; and if that fails, improve your algorithms. Do you think it makes a difference if a server is 99% or 98% loaded?

  • Have any of you ever coded a webapp with Python? Python (as a whole) is supposedly faster than PHP even. :)

  • so, you use mysql_* , and try to teach others something... how pathetic.

  • If you have a while loop and a for loop that run the same thing, a for loop runs faster?

  • @mescaline99 Maybe changing existing code it not a good thing to do depending on the complexity of the program. And if it is short running program, changing this may not really help that much. I see benefits in doing this when I have nested loops. Anything I can do within the loops, even if they look small, you see significant changes in speed.

    Aside from that, I think this lesson was to teach you a good practice on what to do in new applications you make.

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more