/usr/portage

OOP is slower 0

Larry Garfield did a few OOP performance investigations for applying OOP to the Drupal-Project. His observations are pretty clear: all that funky stuff like interceptors, call_user_func_array() and so on is pretty slow compared to straight function calls. I always had the same feeling but converting a feeling into numbers is pretty good. These differences, may they seem huge, should not have such a great influence on your programming habits. Of course, think twice when you use interceptors, same for call_user_func_array(), but this should not stop you using it. Buying an mediocre webserver is cheaper than a developers salary. That’s the simple computation. If you create a component which allows you simply modulate strong and complex business logic which uses all these features, you will be able to produce more maintainable, more stable more rocking solid code. So the computation becomes a no-brainer at all. There are edge cases, where PHP performance matters. But at the end you are always waiting for the RDBMS-response. And – if you need complex algorithms – think on rolling them out as a C-extension for PHP. It is not that hard to build one.

Filed under , & no comments & no trackbacks

Trackbacks

Trackback specific URI for this entry

No Trackbacks

Comments

No comments

Add a Comment & let me know what you think