Re: Move to Fast ZPP?

From: Date: Thu, 25 Jun 2015 06:30:57 +0000
Subject: Re: Move to Fast ZPP?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-86858@lists.php.net to get a copy of this message
On Wed, Jun 24, 2015 at 1:08 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > Hi Dmitry, > > On Wed, Jun 24, 2015 at 7:04 PM, Dmitry Stogov <dmitry@zend.com> wrote: > >> We should NOT use it everywhere. It'll lead to code bloat. > > > OK. Thank you. > I'll use it only for functions called many times. e.g. pg_fetch_*(). > Should I use #ifndef FAST_ZPP? > > I think, ZPP overhead of pg_fetch() is insignificant in comparison to DB access. I didn't change API for ext/mysql* only for really often used functions. Before optimizing something, you'll need to check if you really have a bottleneck. Run some application with callgrind, then check how many times ZPP called from zip_pg_fetch() and its relative cost. If it less than 0.05%, it makes no sense to do anything. Over-optimization may make more harm than benefits. Thanks. Dmitry. > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net >

« previous php.internals (#86858) next »