Bug 166458

Summary: Looking up properties on ModuleNamespaceObject is slow
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: 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
Reported 2016-12-23 00:26:48 PST
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
Yusuke Suzuki
Comment 1 2016-12-23 02:54:31 PST
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
Comment 2 2016-12-28 16:12:44 PST
(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 ***
Note You need to log in before you can comment on or make changes to this bug.