# [PATCH] Some small optimizations

- Thread: https://externals.io/message/26929
- Original archive: https://news-web.php.net/php.internals/26929
- Started by Matt Wilmas on 2006-12-13T13:22:45+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #26929 — Matt Wilmas — 2006-12-13T13:22:45+00:00

URL: https://externals.io/message/26929#26929

Hi,

Here are patches to use Brian Shire's optimizations (applied by Ilia to 5.2 the other day) in a couple more places, and for HEAD.  In Unicode mode, concat_function() is up to 20%+ faster!  (Probably because zend_make_unicode_zval() calls TSRMLS_FETCH(); so not so much with non-ZTS I guess.)

Also removed a few `strlen()` calls that I noticed when looking at is_numeric_string's usage awhile ago. :-)

http://realplain.com/php/misc_optimizations.diff
http://realplain.com/php/misc_optimizations_5_2.diff


Matt

---

## #26931 — Ilia Alshanetsky — 2006-12-13T15:33:31+00:00

URL: https://externals.io/message/26929#26931 · In reply to: #26929

Matt,

The ext/* patches were applied to 5.2, I'll commit the Zend/ ones  
once we have an agreement on the previous patch.




> Hi,
>
> Here are patches to use Brian Shire's optimizations (applied by  
> Ilia to 5.2 the other day) in a couple more places, and for HEAD.   
> In Unicode mode, concat_function() is up to 20%+ faster!  (Probably  
> because zend_make_unicode_zval() calls TSRMLS_FETCH(); so not so  
> much with non-ZTS I guess.)
>
> Also removed a few `strlen()` calls that I noticed when looking at  
> is_numeric_string's usage awhile ago. :-)
>
> http://realplain.com/php/misc_optimizations.diff
> http://realplain.com/php/misc_optimizations_5_2.diff
>
>
> Matt

Ilia Alshanetsky

---

## #26938 — Andrei Zmievski — 2006-12-13T16:54:55+00:00

URL: https://externals.io/message/26929#26938 · In reply to: #26931

Which previous patch? From Matt?

-Andrei



> Matt,
>
> The ext/* patches were applied to 5.2, I'll commit the Zend/ ones once 
> we have an agreement on the previous patch.
>
>
> 
>
> > […]
>
> Ilia Alshanetsky

---

## #26935 — Ilia Alshanetsky — 2006-12-13T17:10:31+00:00

URL: https://externals.io/message/26929#26935 · In reply to: #26938

> Which previous patch? From Matt?

The one for is_numeric_string()


Ilia Alshanetsky
