Simply Jonathan

Improving PHP Speed 

Permanent location of 'Improving PHP Speed'

[A] good example of a PHP “quirk” is the way PHP handles constants. It was one of the major factors affecting performance. Just removing all the constants allowed us to improve the performance by almost 2x[.]

This is a problem I have a hard time figuring out how to react to. To paraphrase DHH: It’s more important to save developer brain cycles than CPU cycles. (I really couldn’t find the original source.)

While substituting variables with constants is easy, it seems wrong, and things that seem wrong are often illogical, and a bad idea to have in a computer program.

(For the record, I’m not saying PHP is a language that’s any good at saving developer brain cycles, but, as Marco says, you can write bad software in any language. PHP just makes it easy to write web software, period. Thus, much bad software is written in PHP.)

This is Simply Jonathan, a blog written by Jonathan Holst. It's mostly about technical topics (and mainly the Web at that), but an occasional post on clothing, sports, and general personal life topics can be found.

Jonathan Holst is a programmer, language enthusiast, sports fan, and appreciator of good design, living in Copenhagen, Denmark, Europe. He is also someone pretentious enough to call himself the 'author' of a blog. And talk about himself in the third person.