# pushing some more optimization patches

- Thread: https://externals.io/message/26435
- Original archive: https://news-web.php.net/php.internals/26435
- Started by Nuno Lopes on 2006-11-09T17:08:51+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

---

## #26435 — Nuno Lopes — 2006-11-09T17:08:51+00:00

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

Hi,

I would like to push 2 more optimization patches onto the PHP tree:
 * make arginfo const (and save memory): 
http://mega.ist.utl.pt/~ncpl/zend_arginfo_const.txt (for php 5.2.1)
Trivial patch, which is expecially good for multi-core systems sharing the 
same cache.

 * use -fvisibility when using gcc 4: 
http://mega.ist.utl.pt/~ncpl/php_gcc4_visibility.txt (for php 5.3/6)
this is a trickier patch and needs some tweaking in extensions exporting 
their own API. The little hacks in the Apache SAPIs are needed because older 
apache versions didn't know anything about gcc 4.

Any opinions or any volunteer to commit those patches? :)

Thanks,
Nuno

---

## #26436 — Ilia Alshanetsky — 2006-11-09T17:54:10+00:00

URL: https://externals.io/message/26435#26436 · In reply to: #26435

> I would like to push 2 more optimization patches onto the PHP tree:
> * make arginfo const (and save memory): http://mega.ist.utl.pt/ 
> ~ncpl/zend_arginfo_const.txt (for php 5.2.1)
> Trivial patch, which is expecially good for multi-core systems  
> sharing the same cache.

The first part looks fine, and if no one objects I'll commit it next  
week.


> * use -fvisibility when using gcc 4: http://mega.ist.utl.pt/~ncpl/ 
> php_gcc4_visibility.txt (for php 5.3/6)
> this is a trickier patch and needs some tweaking in extensions  
> exporting their own API. The little hacks in the Apache SAPIs are  
> needed because older apache versions didn't know anything about gcc 4.

I'd prefer to hold off on adding to 5.2 series at this time, lets try  
it out on 6.0 and if it works fine there perhaps port it back once  
5.3 is on the table.


Ilia Alshanetsky

---

## #26437 — Nuno Lopes — 2006-11-09T18:06:12+00:00

URL: https://externals.io/message/26435#26437 · In reply to: #26436

> > […]
>
> The first part looks fine, and if no one objects I'll commit it next 
> week.

OK, thanks.


> > […]
>
> I'd prefer to hold off on adding to 5.2 series at this time, lets try  it 
> out on 6.0 and if it works fine there perhaps port it back once  5.3 is on 
> the table.

Sure. I didn't meant to push it to 5.2 as it can break some extensions 
(although the fix is trivial).

Nuno

---

## #26448 — Andi Gutmans — 2006-11-10T03:33:21+00:00

URL: https://externals.io/message/26435#26448 · In reply to: #26435

The arginfo patch looks OK to me. Not sure about the visibility patch. I'll
try and look into it tomorrow. 

> -----Original Message-----
> From: Nuno Lopes [mailto:nlopess@php.net] 
> Sent: Thursday, November 09, 2006 9:09 AM
> To: PHPdev
> Subject: [PHP-DEV] pushing some more optimization patches
> 
> Hi,
> 
> I would like to push 2 more optimization patches onto the PHP tree:
>  * make arginfo const (and save memory): 
> http://mega.ist.utl.pt/~ncpl/zend_arginfo_const.txt (for php 
> 5.2.1) Trivial patch, which is expecially good for multi-core 
> systems sharing the same cache.
> 
>  * use -fvisibility when using gcc 4: 
> http://mega.ist.utl.pt/~ncpl/php_gcc4_visibility.txt (for php 
> 5.3/6) this is a trickier patch and needs some tweaking in 
> extensions exporting their own API. The little hacks in the 
> Apache SAPIs are needed because older apache versions didn't 
> know anything about gcc 4.
> 
> Any opinions or any volunteer to commit those patches? :)
> 
> Thanks,
> Nuno 
> 
> --
>  To 
> unsubscribe, visit: http://www.php.net/unsub.php
