Re: Smart strings & memory allocation
| From: | Stanislav Malyshev | Date: | Wed, 18 Jun 2003 14:34:52 +0000 |
| Subject: | Re: Smart strings & memory allocation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-2380@lists.php.net to get a copy of this message | ||
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.
Ok, I have rewrote the patch, please see in attachment. It got somehow
more inflated, but it now has no more than two conditionals in every
codepath, as in original one.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109