BTF Measurements

Herby Vojčík herby at
Tue Mar 13 08:43:42 PDT 2012

Kevin Smith wrote:
>     This is good work, but I don't think every function that doesn’t use
>     'this' is a supporting use case for bound-this functions, though. Many
>     functions are like this:
>         panels.each(function (p) { p.fadeIn(); });
>     and that function would not benefit at all from being converted to a
>     bound-this function.
> Depending on syntax, it could be rewritten like this:
>      panels.each(p => { p.fadeIn(); });
> which would offer gains in brevity, even though lexical this is not
> used.  I'm assuming that for all "non-method" function expressions, BTFs

The question here is, if there is a observable difference in performance 
between BTF and non-BTF, and not to allow the shorter syntax only for 
the less performant one (either only for the more performant one, or for 
both), because shorter form will be used also when not needed.

> would be preferred for this reason.
> kevin


More information about the es-discuss mailing list