On Wed, Jun 24, 2015 at 1:08 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:

> Hi Dmitry,
>
> On Wed, Jun 24, 2015 at 7:04 PM, Dmitry Stogov <dmi...@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
> yohg...@ohgaki.net
>

Reply via email to