[TYPO3-core] RFC #15020: Enhancement of t3lib_div::testInt
Steffen Kamper
info at sk-typo3.de
Fri Sep 10 18:08:24 CEST 2010
Hi,
Ernesto Baschny [cron IT] schrieb:
>
> Seems that the original one was optimized to run under Windows.. :)
> Strange! ;)
>
yes, it's interesting how the numbers differ. In my case it was Windows
Vista Ultima and php 5.3.0
Here are my numbers from Linux 2.6.27-gentoo-r8, php 5.2.13-pl0-gentoo
int
original TRUE : 0.376
variantTrunk TRUE : 0.341 gain 10.3 %
variant1 TRUE : 0.323 gain 16.5 %
variant2 TRUE : 0.325 gain 15.7 %
variant3 TRUE : 0.391 gain -3.8 %
negative int
original TRUE : 0.370
variantTrunk TRUE : 0.339 gain 9.1 %
variant1 TRUE : 0.323 gain 14.4 %
variant2 TRUE : 0.339 gain 9.1 %
variant3 TRUE : 0.393 gain -5.8 %
largest int
original TRUE : 0.401
variantTrunk TRUE : 0.381 gain 5.2 %
variant1 TRUE : 0.353 gain 13.4 %
variant2 TRUE : 0.359 gain 11.7 %
variant3 TRUE : 0.450 gain -10.9 %
int as string
original TRUE : 0.368
variantTrunk TRUE : 0.359 gain 2.6 %
variant1 TRUE : 0.331 gain 11.3 %
variant2 TRUE : 0.339 gain 8.5 %
variant3 TRUE : 0.396 gain -7.0 %
negative int as string
original TRUE : 0.373
variantTrunk TRUE : 0.360 gain 3.6 %
variant1 TRUE : 0.324 gain 15.0 %
variant2 TRUE : 0.340 gain 9.8 %
variant3 TRUE : 0.400 gain -6.8 %
zero
original TRUE : 0.363
variantTrunk TRUE : 0.330 gain 10.1 %
variant1 TRUE : 0.316 gain 15.0 %
variant2 TRUE : 0.323 gain 12.6 %
variant3 TRUE : 0.387 gain -6.1 %
zero as string
original TRUE : 0.367
variantTrunk TRUE : 0.336 gain 9.1 %
variant1 TRUE : 0.318 gain 15.4 %
variant2 TRUE : 0.325 gain 12.7 %
variant3 TRUE : 0.395 gain -7.2 %
int as string with leading zero
original FALSE : 0.369
variantTrunk TRUE : 0.353 gain 4.5 %
variant1 FALSE : 0.323 gain 14.2 %
variant2 FALSE : 0.339 gain 8.8 %
variant3 FALSE : 0.399 gain -7.4 %
positive int as string with plus modifier
original FALSE : 0.366
variantTrunk TRUE : 0.351 gain 4.2 %
variant1 FALSE : 0.331 gain 10.5 %
variant2 FALSE : 0.329 gain 11.3 %
variant3 FALSE : 0.390 gain -6.2 %
negative int as string with leading zero
original FALSE : 0.372
variantTrunk TRUE : 0.357 gain 4.3 %
variant1 FALSE : 0.320 gain 16.2 %
variant2 FALSE : 0.555 gain -32.9 %
variant3 FALSE : 0.410 gain -9.3 %
largest int plus one
original FALSE : 0.555
variantTrunk FALSE : 0.396 gain 40.1 %
variant1 FALSE : 0.508 gain 9.3 %
variant2 FALSE : 0.539 gain 3.1 %
variant3 FALSE : 0.626 gain -11.4 %
string
original FALSE : 0.368
variantTrunk FALSE : 0.348 gain 5.7 %
variant1 FALSE : 0.314 gain 16.9 %
variant2 FALSE : 0.333 gain 10.2 %
variant3 FALSE : 0.404 gain -9.0 %
empty string
original FALSE : 0.365
variantTrunk FALSE : 0.333 gain 9.8 %
variant1 FALSE : 0.161 gain 127.5 %
variant2 FALSE : 0.167 gain 119.0 %
variant3 FALSE : 0.166 gain 119.7 %
int in string
original FALSE : 0.482
variantTrunk FALSE : 0.348 gain 38.4 %
variant1 FALSE : 0.315 gain 52.8 %
variant2 FALSE : 0.326 gain 47.6 %
variant3 FALSE : 0.387 gain 24.6 %
int as string with space after
original FALSE : 0.364
variantTrunk FALSE : 0.349 gain 4.2 %
variant1 FALSE : 0.315 gain 15.6 %
variant2 FALSE : 0.331 gain 9.8 %
variant3 FALSE : 0.387 gain -6.1 %
int as string with space before
original FALSE : 0.365
variantTrunk TRUE : 0.337 gain 8.1 %
variant1 FALSE : 0.320 gain 14.2 %
variant2 FALSE : 0.325 gain 12.1 %
variant3 FALSE : 0.391 gain -6.6 %
int as string with many spaces before
original FALSE : 0.367
variantTrunk TRUE : 0.340 gain 7.7 %
variant1 FALSE : 0.317 gain 15.5 %
variant2 FALSE : 0.339 gain 8.3 %
variant3 FALSE : 0.386 gain -5.1 %
float
original FALSE : 0.511
variantTrunk FALSE : 0.332 gain 53.9 %
variant1 FALSE : 0.464 gain 10.2 %
variant2 FALSE : 0.486 gain 5.2 %
variant3 FALSE : 0.554 gain -7.7 %
float as string
original FALSE : 0.363
variantTrunk FALSE : 0.383 gain -5.3 %
variant1 FALSE : 0.314 gain 15.5 %
variant2 FALSE : 0.328 gain 10.9 %
variant3 FALSE : 0.382 gain -4.8 %
float as string only a dot
original FALSE : 0.365
variantTrunk TRUE : 0.375 gain -2.6 %
variant1 FALSE : 0.319 gain 14.5 %
variant2 FALSE : 0.335 gain 8.9 %
variant3 FALSE : 0.389 gain -6.2 %
float as string trailing zero would evaluate to int 10
original FALSE : 0.366
variantTrunk TRUE : 0.390 gain -6.3 %
variant1 FALSE : 0.319 gain 14.8 %
variant2 FALSE : 0.330 gain 10.8 %
variant3 FALSE : 0.388 gain -5.8 %
float as string trailing zeros would evaluate to int 10
original FALSE : 0.362
variantTrunk TRUE : 0.388 gain -6.8 %
variant1 FALSE : 0.318 gain 13.9 %
variant2 FALSE : 0.344 gain 5.4 %
variant3 FALSE : 0.387 gain -6.4 %
null
original FALSE : 0.350
variantTrunk FALSE : 0.292 gain 19.8 %
variant1 FALSE : 0.297 gain 17.9 %
variant2 FALSE : 0.312 gain 12.2 %
variant3 FALSE : 0.375 gain -6.8 %
vg Steffen
More information about the TYPO3-team-core
mailing list