Re: zend_u_strtod() 400% speed up
| From: | Matt Wilmas | Date: | Fri, 17 Nov 2006 15:26:37 +0000 |
| Subject: | Re: zend_u_strtod() 400% speed up | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26658@lists.php.net to get a copy of this message | ||
Hi Antony!
Wow, lots of testing ya did there. :-) Nice. But, just wanted to mention
that "Matt's patch" is the one I did back in Aug. Did you see my last
message [1] the other day with a new version that only checks for ASCII
chars, doesn't do conversion from Unicode, etc.?
http://realplain.com/php/zend_u_strtod.c
(Untested)
BTW, I see ICU 3.6 is a lot faster on the "current" code (saw a hint about
that in the changelog); though still not close to the manual methods, of
course.
[1] http://news.php.net/php.internals/26538
Matt
----- Original Message -----
From: "Antony Dovgal"
Sent: Friday, November 17, 2006
> Okay, I got some test results.
> First of all, both patches seem to be fine, they both fix several failed
tests:
> Zend/tests/zend_strtod.phpt
> ext/standard/tests/array/range.phpt
> ext/standard/tests/general_functions/001.phpt
> ext/standard/tests/math/abs.phpt
> ext/standard/tests/math/bug30069.phpt
>
> Now the test results (average time in seconds spent on running the test
script):
> ----------------------------------------------------------------
> Platform current | Matt | Tony
> ----------------------------------------------------------------
> Linux intel64 (ICU 3.6, non-ZTS) 104.20 18.93 29.93
> Linux intel64 (ICU 3.6, ZTS) 106.38 19.78 31.97
> Linux i386 (ICU 3.6, non-ZTS) 809.21 25.49 59.78
> Linux i386 (ICU 3.6, ZTS) 708.43 30.22 59.90
> Linux i386 (ICU 3.4, non-ZTS) 526.71 22.39 36.96
> Linux i386 (ICU 3.4, ZTS) 435.27 26.20 37.87
> FreeBSD i386 (ICU 3.6, non-ZTS) -- 20.66 33.47
> ----------------------------------------------------------------
> (Yes, I'm too lazy to rebuild PHP on FreeBSD 4 times more, as the result
is clear).
>
> So we got a clear winner here - the patch by Matt outperforms the patch of
mine by ~30%.
>
> The patches:
> http://tony2001.phpclub.net/dev/tmp/u_strtod.diff - my patch
> http://tony2001.phpclub.net/dev/tmp/u_strtod1.diff -
> Matt's patch
>
> The test script used:
> [...]
>
> --
> Wbr,
> Antony Dovgal