RE: Whacky increment/assignment logic with $foo++ vs ++$foo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





> Furthermore, the amount
> of time micro-optimization takes up (going through old code, I mean)
> could be better spent doing something that actually does increase your
> performance, like implementing a search engine or memcached.  Going
> forward, if you're aware that ++i and i++ are the same for your
> application and ++i is a single php opcode faster (which I don't know
> if it's even measurable, that difference), sure go ahead and use ++i
> but it's certainly not worth serious thought or developer time.
> 
> My two cents.

I do micro optimization with every language I use, when I know, and where I can. I am the one that usually solves slow query problems, and I use best practices on database as well.

Guys, I don't get your point ... if you know that "$var" is a non-sense, feel free to use it ... what I know, is that every double quoted string require parsing, due to variable or char evaluations (\x00) evaluation, if I don't need this waste of time, why should I write a totally meaningless, useless, "$var" where $var is sufficient or more over 'whatever'.$var will be faster?

The fact is that this is my approach for every layer of an application, I am not like that only with PHP. There is something to optimize? Make it your code style and you won't spend a sinlge second more than any other, but at least you'll do your best to reach best performances.

As I have said, I have never had performances problem, and I am a full web stack developer, but you can obviously do whatever you want, is still a matter of points of view.

Regards




 		 	   		  
_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux