| Summary: | [JSC] Add NoIndexing miss optimization | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jarred Sumner <jarred> | ||||
| Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | saam, webkit-bug-importer, ysuzuki | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=239936 | ||||||
| Attachments: |
|
||||||
|
Description
Jarred Sumner
2022-05-10 15:14:30 PDT
Right. Probably this is not so hard. Ah, probably the current implementation is enough optimized for the attached benchmark's pattern. Two code is actually doing a bit different thing. The first one is holes. On the other hand, the second one is filled with undefined. So, >>> 1 in new Array(30) false >>> 1 in Array.from({length:30}) true I wonder if we should optimize `({})[0]` case more. Currently, I think we are invoking operationGetByVal. Hottest bytecodes as <numSamples 'functionName#hash:JITType:bytecodeIndex'> 900 'operationGetByVal#<nil>:None:<nil>' 413 'JSC::JSObject::getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned int, JSC::PropertySlot&)#<nil>:None:<nil>' 61 'from#<nil>:FTL:bc#368' 59 'from#<nil>:FTL:bc#426' 44 'JSC::JSArray::tryCreate(JSC::VM&, JSC::Structure*, unsigned int, unsigned int)#<nil>:None:<nil>' 6 'syscall_thread_switch#<nil>:None:<nil>' Pull request: https://github.com/WebKit/WebKit/pull/2876 Committed 253120@main (801dcc1c9e7a): <https://commits.webkit.org/253120@main> Reviewed commits have been landed. Closing PR #2876 and removing active labels. |