# GSoC Optimizer Update

- Thread: https://externals.io/message/39345
- Original archive: https://news-web.php.net/php.internals/39345
- Started by Graham Kelly on 2008-07-26T00:59:22+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

---

## #39345 — Graham Kelly — 2008-07-26T00:59:22+00:00

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

Hi,

My Google Summer of Code project is to develop and release an initial
version on the optimizer originally being developed by Ilia. The optimizer
will be released to PECL as its own extension, however, it will require APC
in order to run.

Ive worked on cleaning up bugs and testing the existing code. In addition I
have worked on refactoring some of the code to provide a base on which to
build a more powerful and more robust optimizer. I have added a few
additional optimizations including:
1) Optimization of basic math identities
2) Optimization of silence blocks
3) More functions for which we can pre-calculate return values for if they
have all static parameters. (substr, acos, acosh, asin, asinh, atan, atanh,
cos, cosh, sin, sinh, tan, tanh, exp, log10, sqrt, atan2, ceil, floor, fmod,
ini_get [for PHP_INI_SYSTEM values only], ip2long, long2ip, trim, chop,
rtrim, ltrim, rad2deg, deg2rad, abs)
4) worked on making function optimization more aggressive to reduce the
number of required passes for full optimization.
5) A few more minor things here and there

There are plans to change the optimizer hook in APC over to adding a new
compile layer. This should help give the optimizer better control as well as
make it more easily integrateable with other extensions.

In the future I would like to work on a new control system and new analysis
tools for the optimizer. Hopefully such eventual changes will open up the
way for more powerful optimizations down the road. In addition there are
some APC specific optimizations that might be able to be done.

Hopefully the initial release of the optimizer will in available in PECL in
the next few weeks. For now you can get it from pecl/optimizer in CVS.

~ Graham

---

## #39388 — Ilia Alshanetsky — 2008-07-27T18:12:46+00:00

URL: https://externals.io/message/39345#39388 · In reply to: #39345

Great work, I've been periodically reviewing the commits and you're  
making excellent progress in terms of making the optimizer a general  
use tool. One thing I would suggest is creation of a "known issues"  
list, which can act as both a todo list and a warning list for people  
intending to use the optimizer.




> Hi,
>
> My Google Summer of Code project is to develop and release an initial
> version on the optimizer originally being developed by Ilia. The  
> optimizer
> will be released to PECL as its own extension, however, it will  
> require APC
> in order to run.
>
> Ive worked on cleaning up bugs and testing the existing code. In  
> addition I
> have worked on refactoring some of the code to provide a base on  
> which to
> build a more powerful and more robust optimizer. I have added a few
> additional optimizations including:
> 1) Optimization of basic math identities
> 2) Optimization of silence blocks
> 3) More functions for which we can pre-calculate return values for  
> if they
> have all static parameters. (substr, acos, acosh, asin, asinh, atan,  
> atanh,
> cos, cosh, sin, sinh, tan, tanh, exp, log10, sqrt, atan2, ceil,  
> floor, fmod,
> ini_get [for PHP_INI_SYSTEM values only], ip2long, long2ip, trim,  
> chop,
> rtrim, ltrim, rad2deg, deg2rad, abs)
> 4) worked on making function optimization more aggressive to reduce  
> the
> number of required passes for full optimization.
> 5) A few more minor things here and there
>
> There are plans to change the optimizer hook in APC over to adding a  
> new
> compile layer. This should help give the optimizer better control as  
> well as
> make it more easily integrateable with other extensions.
>
> In the future I would like to work on a new control system and new  
> analysis
> tools for the optimizer. Hopefully such eventual changes will open  
> up the
> way for more powerful optimizations down the road. In addition there  
> are
> some APC specific optimizations that might be able to be done.
>
> Hopefully the initial release of the optimizer will in available in  
> PECL in
> the next few weeks. For now you can get it from pecl/optimizer in CVS.
>
> ~ Graham

Ilia Alshanetsky
