[TYPO3-core] RFC: core speedup

Franz Holzinger franz at fholzinger.com
Sat Mar 25 20:02:34 CET 2006


Bernhard Kraft a écrit :

> Hello,
>
>
> This is a CVS patch request.
>
>
> Description:
> I noticed that at many places in the core a construct like:
>
> $somewhat = pow(2, $bit);
>
> is used to get a bit-mask where bit number $bit seen from the LSB
> (least significant bit) side is set.
>

This is wrong:

>-									if ($inputArr[$theField] & pow(2,$a))	{
>+									if ($inputArr[$theField] & (2 << $a))	{
>

The rest:  +1


- Franz






More information about the TYPO3-team-core mailing list