Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-02-01 Thread Johannes Schlüter
On Tue, 2011-02-01 at 01:04 +0100, Pierre Joye wrote: > On Mon, Jan 31, 2011 at 11:33 PM, Stas Malyshev > wrote: > > >> But I strongly believe in a threaded base solution for windows. That's > >> the only way to get anywhere close to the performance we can see on > >> other platforms (read: posi

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-02-01 Thread Pierre Joye
On Tue, Feb 1, 2011 at 10:23 AM, Stas Malyshev wrote: > Though, of course, maybe I'm wrong - what would you suggest is the problem > then? I saw similar slowdowns on 1-process benchmarks as on multi-process > server benchmarks - so I have hard time believing it has anything to do with > threading

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-02-01 Thread Stas Malyshev
Hi! This delta has very little impact on real world apps except those doing exclusively such ops. The benchmarks I did suggest otherwise. Real world apps do huge number of file ops like file_exists(). And while many apps aggressively cache DB calls and such, filesystem calls are still there.

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-02-01 Thread Pierre Joye
On Tue, Feb 1, 2011 at 9:53 AM, Stas Malyshev wrote: > Hi! > >> The filesystem issues are mostly due to what we do in TS mode, way too >> much pointless operations, even if the real cache helps a little bit >> here (take this comment with a bit of salt: as in delta with the cache >> between TS and

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-02-01 Thread Stas Malyshev
Hi! The filesystem issues are mostly due to what we do in TS mode, way too much pointless operations, even if the real cache helps a little bit here (take this comment with a bit of salt: as in delta with the cache between TS and NTS). What we do in TS mode with filesystem that could explain t

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Daniel Convissor
Hi Pierre: On Mon, Jan 31, 2011 at 08:43:40PM +0100, Pierre Joye wrote: > > It does not matter what is the latest VC version. What matters is that > VC6 is a dead cow and we won't support it anymore, even for the > current stable, 5.3. And to be honest I don't really care about > Apache.org's use

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Pierre Joye
On Mon, Jan 31, 2011 at 11:33 PM, Stas Malyshev wrote: >> But I strongly believe in a threaded base solution for windows. That's >> the only way to get anywhere close to the performance we can see on >> other platforms (read: posix). > > My experience is that performance differnces between Window

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Stas Malyshev
Hi! But I strongly believe in a threaded base solution for windows. That's the only way to get anywhere close to the performance we can see on other platforms (read: posix). My experience is that performance differnces between Windows and Linux has very little to do with server model, but muc

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Pierre Joye
On Mon, Jan 31, 2011 at 9:21 PM, William A. Rowe Jr. wrote: > On 1/31/2011 2:04 PM, Pierre Joye wrote: >> On Mon, Jan 31, 2011 at 8:52 PM, William A. Rowe Jr. >> wrote: >> >>> Which I think we agree with, but you answer is a non sequitur, if you are >>> defining the 'next right solution', why dep

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread William A. Rowe Jr.
On 1/31/2011 2:04 PM, Pierre Joye wrote: > On Mon, Jan 31, 2011 at 8:52 PM, William A. Rowe Jr. > wrote: > >> Which I think we agree with, but you answer is a non sequitur, if you are >> defining the 'next right solution', why deploy the n-1 build environment? > > I did not refer to the next rig

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Pierre Joye
On Mon, Jan 31, 2011 at 8:52 PM, William A. Rowe Jr. wrote: > Which I think we agree with, but you answer is a non sequitur, if you are > defining the 'next right solution', why deploy the n-1 build environment? I did not refer to the next right solution but the current and actual right solution

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread William A. Rowe Jr.
On 1/31/2011 1:43 PM, Pierre Joye wrote: > On Mon, Jan 31, 2011 at 6:26 PM, William A. Rowe Jr. > wrote: >> On 1/30/2011 5:02 PM, Stas Malyshev wrote: >>> >>> It looks like all of these are reproducible only on vc6 build and all have >>> same issues >>> with division and rounding, and all not rep

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Pierre Joye
On Mon, Jan 31, 2011 at 6:28 PM, William A. Rowe Jr. wrote: > On 1/30/2011 10:36 PM, Rasmus Lerdorf wrote: >> On 1/30/11 8:30 PM, Daniel Convissor wrote: >>> >>> That's not an option for the large number of people who want to run PHP >>> under Apache, let alone folks who don't have VC9 tools.  The

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Pierre Joye
On Mon, Jan 31, 2011 at 6:26 PM, William A. Rowe Jr. wrote: > On 1/30/2011 5:02 PM, Stas Malyshev wrote: >> >> It looks like all of these are reproducible only on vc6 build and all have >> same issues >> with division and rounding, and all not reproducible on vc9 - which makes me >> thing it's >

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread William A. Rowe Jr.
On 1/31/2011 5:23 AM, Pierre Joye wrote: > hi, > > On Mon, Jan 31, 2011 at 5:36 AM, Rasmus Lerdorf wrote: > >> Aren't Apache VC9 builds readily available these days? >> >> http://www.apachelounge.com/download/ > > I forgot to mention it here again. These builds are not officially > supported by

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread William A. Rowe Jr.
On 1/30/2011 10:36 PM, Rasmus Lerdorf wrote: > On 1/30/11 8:30 PM, Daniel Convissor wrote: >> >> That's not an option for the large number of people who want to run PHP >> under Apache, let alone folks who don't have VC9 tools. The diff() code >> is mauling data types in undesirable, though easily

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread William A. Rowe Jr.
On 1/30/2011 5:02 PM, Stas Malyshev wrote: > > It looks like all of these are reproducible only on vc6 build and all have > same issues > with division and rounding, and all not reproducible on vc9 - which makes me > thing it's > some vc6 problem. Maybe the one Gustavo identified, or something l

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Pierre Joye
hi, On Mon, Jan 31, 2011 at 5:36 AM, Rasmus Lerdorf wrote: > Aren't Apache VC9 builds readily available these days? > > http://www.apachelounge.com/download/ I forgot to mention it here again. These builds are not officially supported by Apache but work very well. Apache still uses VC6 (vc6 crt

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-31 Thread Pierre Joye
hi Rasmus, On Mon, Jan 31, 2011 at 5:36 AM, Rasmus Lerdorf wrote: > Aren't Apache VC9 builds readily available these days? > > http://www.apachelounge.com/download/ > > We can't keep supporting what is now a 13-year old compiler. As I said earlier already, we won't support VC6 any longer (the f

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-30 Thread Rasmus Lerdorf
On 1/30/11 8:30 PM, Daniel Convissor wrote: > On Sun, Jan 30, 2011 at 03:02:25PM -0800, Stas Malyshev wrote: >> >> It looks like all of these are reproducible only on vc6 build and >> all have same issues with division and rounding, and all not >> reproducible on vc9 - which makes me thing it's som

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-30 Thread Daniel Convissor
On Sun, Jan 30, 2011 at 03:02:25PM -0800, Stas Malyshev wrote: > > It looks like all of these are reproducible only on vc6 build and > all have same issues with division and rounding, and all not > reproducible on vc9 - which makes me thing it's some vc6 problem. > Maybe the one Gustavo identified

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-30 Thread Pierre Joye
On Mon, Jan 31, 2011 at 12:02 AM, Stas Malyshev wrote: > Hi! > >> The following bugs seem to stem from these issues: >> >> 52798 dateTime =>  function diff =>  days KO >> 51184 DateInterval has incorrect days property on windows >> >> 52920 Multiple datetime affects divisions >> 52242 DateTime::di

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-30 Thread Stas Malyshev
Hi! The following bugs seem to stem from these issues: 52798 dateTime => function diff => days KO 51184 DateInterval has incorrect days property on windows 52920 Multiple datetime affects divisions 52242 DateTime::diff affects round() 52469 Datetime affect the division 51894 DateTime::Diff b

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-26 Thread Gustavo Lopes
On Wed, 26 Jan 2011 14:13:01 -, Daniel Convissor wrote: On Tue, Jan 25, 2011 at 04:15:26PM +0100, Pierre Joye wrote: be sure to use the right type(s), do the casting correctly Let's dial back the personalities for a moment. The issue raised above produces bugs in DateTime::diff(). The

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-26 Thread Daniel Convissor
Hi Folks: On Tue, Jan 25, 2011 at 04:15:26PM +0100, Pierre Joye wrote: > be sure to use the right type(s), do the casting correctly Let's dial back the personalities for a moment. The issue raised above produces bugs in DateTime::diff(). The existing code relies on C dropping decimal component

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Johannes Schlüter
On Tue, 2011-01-25 at 19:09 +0100, Keisial wrote: > This thread went on bikeshedding about if it's legal C or not. The question whether the code is legal or not is not bikeshedding. Valid, correct, code is important. Both for function and for maintenance. The questions is cleared: The old code is

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Pierre Joye
On Tue, Jan 25, 2011 at 7:09 PM, Keisial wrote: > The change was unrelated to types or castings. No, but Derick knows what I meant here. I can't count the amount of times I had to argue about why one thing or another should be done, like correct casting, floor not being for float, checking mallo

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Keisial
Pierre Joye wrote: > On Tue, Jan 25, 2011 at 4:10 PM, Derick Rethans wrote: >> On Tue, 25 Jan 2011, Pierre Joye wrote: >> >>> Now, as this extension is in the core and had a couple of issues that >>> need to be fixed and without affecting the behavior, then I will fix >>> them. Features addition o

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Andrey Hristov
On 01/25/2011 06:37 PM, Pierre Joye wrote: > On Tue, Jan 25, 2011 at 6:03 PM, Andrey Hristov wrote: > >> the first thing to do is to contact the extension maintainer, whoever >> this is. We have karma system and people with php-src access, however it >> is good first to contact the maintainer. On

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Pierre Joye
On Tue, Jan 25, 2011 at 6:03 PM, Andrey Hristov wrote: > the first thing to do is to contact the extension maintainer, whoever > this is. We have karma system and people with php-src access, however it > is good first to contact the maintainer. On 2-3 occasions you have > intervened in mysqlnd an

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Andrey Hristov
Pierre, On 01/25/2011 04:07 PM, Pierre Joye wrote: > On Tue, Jan 25, 2011 at 4:04 PM, Derick Rethans wrote: >> On Tue, 25 Jan 2011, Pierre Joye wrote: >> >>> Also doing so (testing a == NULL instead of !a) is a common and widely >>> adopted practice >> >> Really? I've never written code like that

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Pierre Joye
On Tue, Jan 25, 2011 at 4:10 PM, Derick Rethans wrote: > On Tue, 25 Jan 2011, Pierre Joye wrote: > >> Now, as this extension is in the core and had a couple of issues that >> need to be fixed and without affecting the behavior, then I will fix >> them. Features addition or major changes will obvio

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Derick Rethans
On Tue, 25 Jan 2011, Pierre Joye wrote: > Now, as this extension is in the core and had a couple of issues that > need to be fixed and without affecting the behavior, then I will fix > them. Features addition or major changes will obviously need review, > as usual. if (! tzid) is *not* a

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Pierre Joye
On Tue, Jan 25, 2011 at 4:04 PM, Derick Rethans wrote: > On Tue, 25 Jan 2011, Pierre Joye wrote: > >> Also doing so (testing a == NULL instead of !a) is a common and widely >> adopted practice > > Really? I've never written code like that. It's a preference. That's not really a surprise. > What

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Derick Rethans
On Tue, 25 Jan 2011, Pierre Joye wrote: > Also doing so (testing a == NULL instead of !a) is a common and widely > adopted practice Really? I've never written code like that. It's a preference. What you do in your maintained extensions is up to you, but don't override other people's preferences

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Pierre Joye
hi, On Mon, Jan 24, 2011 at 8:11 PM, Gustavo Lopes wrote: > Hum? Pierre's change is "correct", but it's also redundant. It is not redundant. It can even help some compilers or analyzer. > Please read the C FAQ: http://c-faq.com/null/ptrtest.html > > What would be invalid would be testing for a

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Johannes Schlüter
On Mon, 2011-01-24 at 19:11 +, Gustavo Lopes wrote: > Hum? Pierre's change is "correct", but it's also redundant. > > Please read the C FAQ: http://c-faq.com/null/ptrtest.html > > What would be invalid would be testing for a null pointer with something > like this: > > void *p; > ... > int

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Gustavo Lopes
On Mon, 24 Jan 2011 16:53:48 -, Johannes Schlüter wrote: On Mon, 2011-01-24 at 13:19 +0100, Pierre Joye wrote: NULL is for pointers where 0 is for integer-like. Testing if a ptr is NULL should be done by testing for NULL or not NULL. While compilers tolerate *ptr = 0 by casting 0 to N

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Johannes Schlüter
On Mon, 2011-01-24 at 13:19 +0100, Pierre Joye wrote: > > NULL is for pointers where 0 is for integer-like. > > Testing if a ptr is NULL should be done by testing for NULL or not > NULL. > > While compilers tolerate *ptr = 0 by casting 0 to NULL, any other > runtime check must use NULL. That's K

[PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Pierre Joye
On Mon, Jan 24, 2011 at 12:53 PM, Derick Rethans wrote: > On Mon, 24 Jan 2011, Pierre Joye wrote: > >> On Mon, Jan 24, 2011 at 11:15 AM, Derick Rethans wrote: >> >> > Why did you change this? It does exactly the same. >> >> No it does not. This test is now correct given its initial goal. > > Uh?

[PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Derick Rethans
On Mon, 24 Jan 2011, Pierre Joye wrote: > On Mon, Jan 24, 2011 at 11:15 AM, Derick Rethans wrote: > > > Why did you change this? It does exactly the same. > > No it does not. This test is now correct given its initial goal. Uh? Since when is: if (!foo) not the same as: if (foo

[PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Pierre Joye
hi, On Mon, Jan 24, 2011 at 11:15 AM, Derick Rethans wrote: > Why did you change this? It does exactly the same. No it does not. This test is now correct given its initial goal. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime De

[PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Derick Rethans
On Thu, 20 Jan 2011, Pierre Joye wrote: > pajoye Thu, 20 Jan 2011 07:05:34 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=307618 > > Log: > - be sure that we got tzid by adding a default case [snip] > @@ -908,11 +897,24 @@ >