On Thursday, January 22, 2015, Mark A. Hershberger <mah(a)nichework.com>
wrote:
Legoktm <legoktm.wikipedia(a)gmail.com
<javascript:;>> writes:
On 01/21/2015 09:39 AM, Jeroen De Dauw wrote:
Hey,
Does the new syntax offer any advantage over the old one?
It's a little bit faster by cutting down one function call which adds up
when a lot of hooks are called.
"adds up" is a poor defense for creating work for end users and
developers. Has anyone actually measured what the difference is or is
this just an example of premature optimization[1]?
Mark.
Footnotes:
[1]
http://en.wikipedia.org/wiki/Program_optimization#When_to_optimize
I don't have before/after measurements but Aaron started changing from
wfRunHooks to direct Hook calls based on data gathered from WMF production
profiling. There was a non-trivial performance impact of the additional
layer of indirection.
Bryan
--
Bryan Davis Wikimedia Foundation <bd808(a)wikimedia.org>
[[m:User:BDavis_(WMF)]] Sr Software Engineer Boise, ID USA
irc: bd808 v:415.839.6885 x6855