const iterable = [...(new Array(1000))].map((_,i) => i)
const getIterable = () => iterable
function* gen() {
let limit = 1000;
while (limit--) {
yield 999 - limit;
}
}
const getIterator = () => gen()Initializing...
| Test Case | Ops/sec | |
|---|---|---|
| iterable | | ready |
| iterator | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.