The scope of eval()'d code is determined by the scope in which it was created and by whether or not the code uses the ES5 strict mode pragma. This makes it so tricky to analyze that at least one JavaScript engine, V8, declines to optimize it altogether. The same is not true of JavaScript source compiled via the Function object constructor, since such code always executes in global scope.
We should test if Function is faster and use it if so.
See this Wikitech-l thread for context: http://www.gossamer-threads.com/lists/wiki/wikitech/414263#414263.
Version: 1.23.0
Severity: normal