On Wed, May 14, 2014 at 1:38 PM, Ophir LOJKINE <notifications@github.com>wrote:

> In src/preamble.js:
>
> > +
> > +    // When the code is compressed, the name of cfunc is not literally 'cfunc' anymore
> > +    var cfuncname = parseJSFunc(function(){return cfunc}).returnValue;
> > +    // Call the function
> > +    funcstr += 'var ret = ' + cfuncname + '(' + argNames.join(',') + ');';
> > +    if (!numericRet) { // Return type can only by 'string' or 'number'
> > +      // Convert the result to a string
> > +      var strgfy = parseJSFunc(function(){return Pointer_stringify}).returnValue;
> > +      funcstr += 'ret = ' + strgfy + '(ret);';
> > +    }
> > +    if (!numericArgs) {
> > +      // If we had a stack, restore it
> > +      funcstr += JSsource['stackRestore'].body + ';';
> > +    }
> > +    funcstr += 'return ret})';
> > +    return eval(funcstr);
>
> We have already talked about that in the previous merge request. new
> Function creates functions that are much slower.
>

Can you go into more detail?  (Maybe link the other conversation?)  I've
never heard of new Function being any slower than eval.

-- 
Chad Austin
Technical Director, IMVU
http://engineering.imvu.com <http://www.imvu.com/members/Chad/>
http://chadaustin.me