On 5/9/16, 9:37 AM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:

>We might be able to figure out how to use Array.some() instead. Return
>false for most iterations of the loop, and then return true when a "break"
>is encountered (and return false when "continue" is encountered).
>Replacing break and continue could be tricky, though, since they are
>handled in a different sub-emitter.

Possible.  Testing needs to be done to make sure that these patterns
perform better since they introduce a function call and maybe some scoping
issues.

It may also be that some future version of the compiler generates
different patterns if it knows there is no early exit from the loop.

-Alex

Reply via email to