[TYPO3-core] RFC: core speedup

Ingmar Schlecht ingmar at typo3.org
Mon Mar 27 18:06:12 CEST 2006


Hi Bernhard,

your patch won't go into 4.0 because it affects parts of the system
which are too critical to change so shortly before a release.

But in general I must say that you proved your case very well and I'm
not against having the patch in 4.1, but I leave the decision (aka
Schwarzer Peter) to Kasper.

cheers,
Ingmar

Bernhard Kraft wrote:
> Kasper Skårhøj wrote:
>>> I agree fully with ingmar:
>>>
>>> We should not change this unless you can prove a significant  
>>> performance gain.
> 
> Hi !
> 
> 
> Pherhaps you didn't take a look at the powtest.php testing-script (which I used
> to confirm the change works and used to measure the speed)
> 
> There's this part inside:
> --------------------------------------
> // Doing sanity test:
> for ($x = 0; $x < 32; $x++)	{
> 	$p = $x%($maxpow+1);	// $p will be between 0-31
> 	$r1 = pow(2, $p);
> 	$r2 = (1<<$p);
> 	if ($r1!=$r2)	{
> 		echo 'FATAL ERROR ! This should never happen pow(2, n)!=(2<<n) !'.chr(10);
> 		exit();
> 	}
> }
> --------------------------------------
> 
> 
> And I also don't see why there should be any objections ? There won't be any hidden bugs.
> 
> You apply the patch - Test if permissions work like before.
> 
> 
> 
> I'm not with your opinion not to change parts of the code if they actually work ...
> We change code all the time - and not only for fixing bugs but also for introducing new features.
> And this isn't even a feature but only a little change which brings back a little cpu resources :)
> 
> But I won't care anymore about this - my main objection was that generating bit-masks get's done
> the "proper" way via bit-shifting and not using the mathematical pow() function. If others don't
> think this is fine let it be as it is.
> 
> 
> Dmitry: Dont worry - We are talking about a few microseconds here ... I assume ... as I wrote I
> intended this code not only as speed-up but also as "correction" of the actual code ...




More information about the TYPO3-team-core mailing list