On Fri, Sep 6, 2013 at 8:01 PM, Johannes Schlüter <johan...@schlueters.de>wrote:
> From the explanation it sounds like there shouldn't be a high cost, but > as fcalls are a key operation and already quite slow I wonder if you > could share some benchmarks. (non-debug-non-tsrm-build) > > A good start might be Zend/bench.php. And I understand this is not the > final patch but good to have the order of magnitude. > I didn't see any obvious regressions from Zend/bench.php and this is also what I would expect: The parts relating to named arguments are hidden behind optype-specialization of the send opcodes, so those shouldn't affect perf. There is also a bit extra code in do_fcall_common to handle passing of additional unknown named params, but that's also just two branches in a large mix of other code. So it really "shouldn't" impact performance and judging from Zend/bench.php it doesn't. I also did a very quick test how a normal call compares to one using named params. Right now the latter is about 25% slower. But I'm pretty sure this number can be improved a good bit, e.g. I'm not yet making use of CACHED_PTR to store the argument number of the parameter. Nikita