mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-28 11:54:15 +00:00
We already have fast path for built-in iterators that skips `next()`
lookup and iteration result object allocation applied for `for..of` and
`for..in` loops. This change extends it to `iterator_step()` to cover
`Array.from()`, `[...arr]` and many other cases.
Makes following function go 2.35x faster on my computer:
```js
(function f() {
let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
for (let i = 0; i < 1000000; i++) {
let [a, ...rest] = arr;
}
})();
```
|
||
|---|---|---|
| .. | ||
| CustomElementDefinition.cpp | ||
| CustomElementDefinition.h | ||
| CustomElementName.cpp | ||
| CustomElementName.h | ||
| CustomElementReactionNames.cpp | ||
| CustomElementReactionNames.h | ||
| CustomElementReactionsStack.h | ||
| CustomElementRegistry.cpp | ||
| CustomElementRegistry.h | ||
| CustomElementRegistry.idl | ||