Re: Function call speedup (CV applied to functions)

From: Date: Wed, 06 Dec 2006 16:32:22 +0000
Subject: Re: Function call speedup (CV applied to functions)
Groups: php.internals 
Request: Send a blank email to internals+get-26822@lists.php.net to get a copy of this message
We had very similar idea in the past. BTW it is possible to optimize function calls mach more. Not only ZEND_DO_FCALL but also ZEND_INIT_FCALL_BY_NAME can be optimized, and we can reuse the same cache entries for all op_arrays from the same PHP file. Sure, I went shallow with this first version just to have something to discuss, so that general intent was clear. There's certainly a lot that can be done to improve it both from a code-line coverage and in actual implementation (for one thing, I got a crash with it a couple days ago which I havn't bothered tracking down).
Making the cache per-file (rather than per-scope) would definately be a good direction to go (per-execution would unfortunately break opcode cache assumptions so we can't go that high), but I couldn't come up with a simple/easy way to "track" the current file. I suppose we could use the op_array's filename attribute to lookup a cache vector from a hashtable anytime scope changes...
I'll make a patch and send it to you in fey days.
Can't wait to see it! :) -Sara

« previous php.internals (#26822) next »