• Monday, June 29th, 2009 at 13:10 | #1

    seriously! some people just can’t get it off their heads. they want to optimize optimize and optimize! some time back my senior was the same. he would have me write “not OO code” because he thought optimization(no setters/getters, use global fields!, less classes, methods..etc) is better than all the benefits of OO. after months of arguing and stuff. he is much better now.

  • admin
    Monday, June 29th, 2009 at 14:08 | #2

    It’a amazing how such morons end up as team leaders – probably because they speak at a level that CEO and directors can understand.

  • Sunday, November 22nd, 2009 at 06:32 | #3

    Hahaha, this crap people post never ceases to amaze me.

    The best part is the echo vs. print stuff was axed in deference to people noticing :)

    If it’s not in a loop or not recursive, it’s probably not worth looking at.

    A few things I’ve also noticed:
    Using references in PHP can actually slow things down. Even I make this mistake because I’m used to compiled languages that actually do what they’re told. I’m not sure with respect to “quasi-return by reference” vs. return. However, if it doesn’t need to be a reference because you’re not actually modifying it, *do not use reference passing.* Doing so actually slows things down. Why? PHP won’t copy it anyway if you don’t modify it, so you’re actually making it track/do more. I didn’t believe it at first … but it makes sense.

    Also. ” vs. ‘

    Anyone who has looked at the PHP lexer knows that the interpolated variables are pulled out by the lexer itself. Using a single quoted string vs. a double quoted string without variables will only speed things up to the extent that the lexer does not have to check for a variable. This will not be measurable.

    I don’t know why, but deep recursion may be a problem for PHP sometimes. On the other hand, the function I’m referring to is only anecdotal as was rewritten a far less stupid way :)

    I think what bothers me most about php.net is seeing meaningless profiling/tests of things that don’t matter.

    Look at loops. Look at a Donald Knuth book. Seriously, no matter how much you optimize a bubblesort, it’s still a bubblesort.

    Consider this a love letter to cancel out the hate mail ;)

  • admin
    Monday, November 23rd, 2009 at 09:12 | #4

    thank you for the love letter :-)

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
TOP