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

Franz Holzinger franz at ttproducts.de
Fri Jul 9 07:29:59 CEST 2010


Le 08/07/2010 14:59, Dmitry Dulepov a écrit :
> 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...

Thanks for this comment!

+1

- Franz




More information about the TYPO3-team-core mailing list