On Wed, 18 Jun 2003, Stanislav Malyshev wrote:

> SS>>     If you move the additional check (newlen <
> SS>>     SMART_STR_START_SIZE) and preallocation into the if (!(d)->c)
> SS>>     branch, the changes won't affect the common code path.
>
> IMO, the common code path is that of SMART_STR_START_SIZE, since as I
> said 90% of strings never reach beyond initial alloc. But I see your
> point, you are right, the START_SIZE one should be into if (!(d)->c)
> branch.

    Common referred to real applications, not 'make test'.

    In fact, whenever strings are not allocated through the
    engine, 80 bytes is a really poor choice, because the malloc
    implementation will very likely allocate a 128 byte chunk
    anyway.

    - Sascha (who just yesterday ported FreeBSD's malloc.c for
              shared memory handling)

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to