this is an interesting analysis of the runtime performance of the various eval-like options. in general it's not big difference between eval and Function across browsers.
http://weblogs.asp.net/yuanjian/archive/2009/03/22/json-performance-comparison-of-eval-new-function-and-json.aspx On Tue, May 19, 2009 at 7:20 PM, John Resig <jere...@gmail.com> wrote: > I don't remember the original discussion/change, off-hand. If YUIMin is > still able to generate an adequate file size using Function then I don't see > why we shouldn't switch. > > --John > > > > On Tue, May 19, 2009 at 6:46 PM, Andrea Giammarchi < > andrea.giammar...@gmail.com> wrote: > >> John, can I ask you why you did not chose Function(string)() ? YUIMin, if >> I am not wrong, works with Function because there are less problems with the >> external scope ( Function works in the global one, so the only problem is >> "arguments" rather than possible variables that are not globals ) >> >> >> On Tue, May 19, 2009 at 11:32 PM, John Resig <jere...@gmail.com> wrote: >> >>> That's specifically being done to allow YUIMin to properly compress >>> jQuery (it sees an eval and assumes that it can't be compressed, but using >>> that technique allows it to work). >>> >>> --John >>> >>> >>> >>> On Tue, May 19, 2009 at 5:22 PM, Justin Meyer <justinbme...@gmail.com>wrote: >>> >>>> >>>> I assume there must be a good reason, but why is window['eval'] used >>>> as opposed to window.eval in httpData? This has some issues in rhino >>>> for reasons discussed here: >>>> >>>> >>>> http://www.mail-archive.com/dev-tech-js-engine-rh...@lists.mozilla.org/msg00664.html >>>> >>>> I know jQuery's tests run in rhino, but perhaps not XHR JSON requests? >>>> >>>> Is there something that you are doing to rhino (I'm not in strict >>>> mode) that allows this? >>>> >>>> Thanks for your help. >>>> >>>> >>> >>> >>> >> >> >> > > > > -- Christopher Thatcher --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---