PHP performance tips
Top Comments
All Comments (36)
-
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.
How to speed up ASP performance:
Switch to PHP. :^P
shanedk 2 years ago 31
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.
mescaline99 2 years ago 13