Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-10-13 Thread Dmitry Stogov
bench.php should be faster as well. It must be slower because of not lucky code locality or something like that. Thanks. Dmitry. On Mon, Oct 13, 2014 at 4:40 PM, wrote: > Hi Dmitry, > > thanks for taking a look, > > On Mon, October 13, 2014 13:38, Dmitry Stogov wrote: > > Hi Anatol, > > > > > >

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-10-13 Thread Dmitry Stogov
Hi Anatol, At first, I still saw the same big difference on Linux. bench.php ZTS - 1.340 sec, native TLS - 1.785 sec. As I understood, it must be related to incomplete changes in build scripts, related to ZEND_ENABLE_STATIC_TSRMLS_CACHE. Right? If I get it properly, main PHP binary should be comp

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-10-08 Thread Dmitry Stogov
Hi Anatol, Thanks for update, I'll take a look a bit later, but the performance difference looks quite good now. Dmitry. On Wed, Oct 8, 2014 at 11:26 AM, Anatol Belski wrote: > Moin Dmitry, > > On Mon, October 6, 2014 09:01, Anatol Belski wrote: > > On Sun, October 5, 2014 21:32, Anatol Belski

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-10-08 Thread Anatol Belski
Moin Dmitry, On Mon, October 6, 2014 09:01, Anatol Belski wrote: > On Sun, October 5, 2014 21:32, Anatol Belski wrote: > >> Hi Dmitry, >> >> >> >> On Wed, October 1, 2014 08:01, Dmitry Stogov wrote: >> >> >>> Hi Anatol, >>> >>> >>> >>> >>> I know, TSRM uses TLS APIs internally. >>> >>> >>> >>> >>>

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-10-06 Thread Anatol Belski
On Sun, October 5, 2014 21:32, Anatol Belski wrote: > Hi Dmitry, > > > On Wed, October 1, 2014 08:01, Dmitry Stogov wrote: > >> Hi Anatol, >> >> >> >> I know, TSRM uses TLS APIs internally. >> >> >> >> In my opinion, the simplest (and probably efficient) way to get rid of >> TSRMLS_DC arguments and

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-10-05 Thread Anatol Belski
Hi Dmitry, On Wed, October 1, 2014 08:01, Dmitry Stogov wrote: > Hi Anatol, > > > I know, TSRM uses TLS APIs internally. > > > In my opinion, the simplest (and probably efficient) way to get rid of > TSRMLS_DC arguments and TSRMLS_FETCH calls, would be introducing a global > thread specific variab

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-30 Thread Dmitry Stogov
Hi Anatol, I know, TSRM uses TLS APIs internally. In my opinion, the simplest (and probably efficient) way to get rid of TSRMLS_DC arguments and TSRMLS_FETCH calls, would be introducing a global thread specific variable. __thread void ***tsrm_ls; As I understood it won't work on Windows anyway,

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-30 Thread Anatol Belski
Hi Dmtry, thanks for taking a look at this. On Wed, October 1, 2014 00:09, Dmitry Stogov wrote: > Hi, > > > I took a quick look over the patch. > I didn't get why it's named "native_tls" now, because it doesn't use > "__thread" variables anymore. I was wondering myself but now I see (intentionall

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-30 Thread Dmitry Stogov
Hi, I took a quick look over the patch. I didn't get why it's named "native_tls" now, because it doesn't use "__thread" variables anymore. Actually, now the patch get rid of additional TSRMLS_ arguments, but performs near the same thing as TSRMLS_FETCH() on each module global access. It leads to h

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-28 Thread Dmitry Stogov
Hi Anatol. I'll take a look on Tuesday or Wednesday. Thanks. Dmitry. On Sat, Sep 27, 2014 at 12:59 AM, Anatol Belski wrote: > Hi Dmitry, > > On Mon, September 22, 2014 08:43, Dmitry Stogov wrote: > > Hi Anatol, > > > > > > I didn't completely get your ideas, but if tsrm_ls_cache can't be > > e

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-26 Thread Anatol Belski
Hi Dmitry, On Mon, September 22, 2014 08:43, Dmitry Stogov wrote: > Hi Anatol, > > > I didn't completely get your ideas, but if tsrm_ls_cache can't be > exported on Windows directly, can we have a copy of tsrm_ls_cache in each > DLL/EXE > and initialize it once? > > Thanks. Dmitry. > Joe and me wa

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-21 Thread Dmitry Stogov
Hi Anatol, I didn't completely get your ideas, but if tsrm_ls_cache can't be exported on Windows directly, can we have a copy of tsrm_ls_cache in each DLL/EXE and initialize it once? Thanks. Dmitry. On Sun, Sep 21, 2014 at 9:19 PM, Anatol Belski wrote: > Hi Dmitry, > > On Sat, September 20, 2

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-21 Thread Anatol Belski
Hi Dmitry, On Sat, September 20, 2014 09:58, Anatol Belski wrote: > Hi Dmitry, > > > On Fri, September 19, 2014 12:43, Dmitry Stogov wrote: > >> I know :) >> Interned strings in PHP5 were implemented as characters allocated in one >> single buffer. Adding new strings into this buffer from differe

[PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-20 Thread Anatol Belski
Hi Dmitry, On Fri, September 19, 2014 12:43, Dmitry Stogov wrote: > I know :) > Interned strings in PHP5 were implemented as characters allocated in one > single buffer. Adding new strings into this buffer from different threads > would require synchronization (locks). > > In PHP7 this implementat

[PHP-DEV] Re: [PHP-CVS] com php-src: fix CG(empty_string) init in ZTS: Zend/zend.c

2014-09-18 Thread Anatol Belski
Hi Nikita, On Thu, September 18, 2014 22:34, Nikita Popov wrote: > On Thu, Sep 18, 2014 at 5:14 PM, Anatol Belski wrote: > > >> Commit:e8b497ad8eb74273f7f44ae7e515e7a5e95b50f7 >> Author:Anatol Belski Thu, 18 Sep 2014 16:45:50 >> +0200 >> Parents: f162b3f736f07ad868abec6ea8b44a9