Welcome Guest, Not a member yet? Register   Sign In
PHP double quotes versus single quotes
#11

[eluser]jedd[/eluser]
The trouble with optimising .. is that it will send you mad.

I use while's all the time in bash, but rarely in PHP. Who knows why. Certianly not me. I use for's everywhere, and I rarely use continue. Who knows why ... (et cetera)

A few config changes to MySQL from the shipped default will improve your performance no end, but not many people know the magic incantations necessary there.

While I am certainly not an advocate of 'the hardware will save us' approach to software development, I think that very few organisations are operating in the space where a few percentage points of performance are worth the dev's & tester's time compared to, say, just bumping up the memory on the box.

Finally, there's a trade-off between optimising your code's run-time performance now, versus your code's maintainability next Thursday. That is, while you can turn almost every 4-line if construct into a one-line ternary operator - this doesn't mean that you should. It's important to be kind to your future self, for you shall surely have to revisit your code, and it's almost certain you'll be just a little dumber in six months.




Theme © iAndrew 2016 - Forum software by © MyBB