Iterators, generators, finally, and scarce resources (Was: April 10 2014 Meeting Notes)

Mark S. Miller erights at google.com
Tue Apr 29 16:26:33 PDT 2014


On Tue, Apr 29, 2014 at 4:07 PM, Jason Orendorff
<jason.orendorff at gmail.com>wrote:

> On Tue, Apr 29, 2014 at 2:40 AM, Andy Wingo <wingo at igalia.com> wrote:
> > == Calling return() on early exit from for-of is expensive
> >
> > Wrapping a try/finally around each for-of is going to be really
> > expensive in all engines right now.  I'm skeptical about our ability to
> > optimize this one away.  Avoiding try/catch around for-of was one reason
> > to move away from StopIteration, and it would be a pity to re-impose
> > this cost on every for-of because of what is, in the end, an uncommon
> > use case.
>
> Andy, please see
> <http://esdiscuss.org/topic/april-8-2014-meeting-notes#content-16>. I
> don't see a big performance cost here.
>

I also found Allen's response to my question at <
http://esdiscuss.org/topic/april-8-2014-meeting-notes#content-25>
informative.


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140429/a6d29b25/attachment.html>


More information about the es-discuss mailing list