Wednesday, June 8, 2011

Faster PHP? Kick off getters and setters.

In PHP getters and setters sucks on performance.



Output on my Ubuntu VM (PHP 5.3.5):
test_getters_setters: 0.64945447444916
test_public_properties: 0.27986690998077
test_magic_methods: 1.0444820642471
test_array_access: 0.9640593290329


WTF? How many getters/setters You use in your project per request?

Source: Let's make the web faster by Google

No comments: