Re: How to correctly spec sequences requiring an iterable

On 11/18/13 1:05 PM, Domenic Denicola wrote:
> From: Boris Zbarsky <bzbarsky@MIT.EDU>
>
>> 6) Walk through with IteratorStep/IteratorValue etc, converting each sequence element before stepping to the next one.
>>
>> Does anyone see any obvious problems with that other than the (controversial) object check in step 1?
>
> Does this step 6 commit implementations to two separate loops, one to convert, and then one to actually do things with the elements?

Yes, per the discussion in the thread about that issue.

> It seems worrying to bake this performance cost into the spec for every sequence-using function

The performance cost of using the object-happy insanity that is 
IteratorStep/IteratorValue completely dwarfs the extra over an array 
here, as far as I can tell.  ;)

But maybe I misunderstand the performance cost you're worrying about?

-Boris

Received on Monday, 18 November 2013 18:09:51 UTC