On Wed, February 22, 2012 3:45 am, Flavius Aspra wrote:
> On 02/22/2012 07:29 AM, Rasmus Lerdorf wrote:
>> complicated optimization passes or any of those things
>
> Would such things be welcome/needed in the engine or as an extension?

Note that he said "complicated" :-)

There are many trivial / easy optimizations of low-hanging fruit.

It's just the out-of-band not-in-real-time complicated ones that PHP
doesn't do, shouldn't do, and won't do.

So if you find a quick easy one, it's most welcome...

The complicated ones, not so much :-)

PS
The misinformation that opcode caches "save" compilation time
routinely rears it's ugly head.  Opcode caches save disk reads.  Using
the already-opcoded chunk is just gravy, because the cache does this
(grossly over-simplified):

if ($opcode = opcode_cache_get($filename)){ //added by opcode cache
  //do no disk I/O EXPENSIVE
  //Oh, and for gravy, don't compile it.
}
else{
  $source = file_get_contents($filename); //EXPENSIVE
  $opcode = php_compile($source);
}
php_execute($opcode);

instead of this:


if ($source = opcode_cache_get($filename)){ //added by opcode cache
  //do no disk I/O EXPENSIVE
}
else{
  $source = file_get_contents($filename); //EXPENSIVE
}
$opcode = php_compile($source); //cheap and easy small optimization
missed
php_execute($opcode);

-- 
brain cancer update:
http://richardlynch.blogspot.com/search/label/brain%20tumor
Donate:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to