NeTTN
Denoβ€’3y agoβ€’
10 replies
NeTT

Speed of generators

How fast are JS generators when used as iterators?

To be clear, I see the for..of loop being very slow compared to a plain for or
while
loop when used on arrays. Is it because the for..of loop is inherently slow or because the iterator behind it is slow?
Was this page helpful?