# Optimizing emalloc and friends

- Thread: https://externals.io/message/1973
- Original archive: https://news-web.php.net/php.internals/1973
- Started by marcus.boerger@t-online.de on 2003-05-25T01:35:21+00:00
- Messages: 2
- 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

---

## #1973 — marcus.boerger@t-online.de — 2003-05-25T01:35:21+00:00

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

Hi,

the attached patch is the beginning of introducing emalloc_t and friends
to the engine which passes TSRM information to emalloc. Or to be
correct when the full work is done the _emalloc calls are replaced by
_emalloc_t calls which no longer need to do TSRMLS_FETCH().

As you can see i haven't done everything but from what i measured so far
i'd expect a performance increase of about 10%.

Also when all is done there will be NO difference when in non ZTS mode.
And since i left the old function names as inline funcs the API doesn't
even change. However it is a good idea to change all the _emalloc calls
to the new _emalloc_t calls as i've done with the streams stuff already.

If we can find a consensus here i'll work that stuff out and apply it asap.

regards
marcus

---

## #1981 — marcus.boerger@t-online.de — 2003-05-25T11:24:24+00:00

URL: https://externals.io/message/1973#1981 · In reply to: #1973

At 04:46 25.05.2003, Moriyoshi Koizumi wrote:
>The patch is where..? Try suffixing the file name of the attachment with
>".txt"; this tip is known to work with Outlook Express at least.


2nd try.

marcus
