Bug 166458
| Summary: | Looking up properties on ModuleNamespaceObject is slow | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | benjamin, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, mark.lam, msaboff, oliver, ticaiolima, ysuzuki |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Saam Barati
Consider these two programs:
a:
```
import * as assert from "../assert.js";
let array = [];
for (let i = 0; i < 40000000; i++) {
array.push(i);
}
for (let i = 0; i < 40000000; i++) {
assert.eq(array[i], i);
}
```
b:
```
import {eq} from "../assert.js";
let array = [];
for (let i = 0; i < 40000000; i++) {
array.push(i);
}
for (let i = 0; i < 40000000; i++) {
eq(array[i], i);
}
```
Program "b" is more than 4x faster than program "a".
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Yusuke Suzuki
https://bugs.webkit.org/show_bug.cgi?id=160590 this one?
Currently I think we can convert this access to CheckCell, GetClosureVar in DFG.
Saam Barati
(In reply to comment #1)
> https://bugs.webkit.org/show_bug.cgi?id=160590 this one?
> Currently I think we can convert this access to CheckCell, GetClosureVar in
> DFG.
Yeah, this is a dupe.
*** This bug has been marked as a duplicate of bug 160590 ***