On Thu Jan 22 2015 at 1:10:27 PM Bryan Davis <bd...@wikimedia.org> wrote:

> On Thursday, January 22, 2015, Mark A. Hershberger <m...@nichework.com>
> wrote:
>
> > Legoktm <legoktm.wikipe...@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.
>
>
Sure, but obvious performance gains are obvious. The real question to
me is "was moving it into a static function inside of Hooks a benefit over
it just being a global function?" My guess is no, not really.

-Chad
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to