[TYPO3-core] RFC #15020: Enhancement of t3lib_div::testInt

Dmitry Dulepov dmitry at typo3.org
Thu Jul 8 14:59:37 CEST 2010


Hi!

Steffen Kamper wrote:
> is that so? Performance wise we decided at some places early returns, so
> we should overthink this.

Well... There are several issues here. Firsts, if we relax one rule, why
would anybody follow others? Secondly, 0.000001 second is not a reason to
make less readable code, especially when there are PHP accelerators around :)

I still think that a single return is a good thing and we should follow it.
Can anybody prove that two returns in this case give a *significant*
performance gain? There are areas that take far more time to execute, there
are unoptimized database indexes, and so on. One or two returns is not the
area where you (=the reader of this message) can save much but you
definitely can sacrifice readability. CGL was written very carefully with
good code style and general code improvement in mind. I am not happy that
now we consider going back because of microseconds gained when seconds are
lost in other places.

Think global...

-- 
Dmitry Dulepov
TYPO3 core&security teams member
Twitter: http://twitter.com/dmitryd
Read more @ http://dmitry-dulepov.com/


More information about the TYPO3-team-core mailing list