| Summary: | %TypedArray%.prototype.{indexOf,lastIndexOf} are not spec-perfect | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alexey Shvayka <ashvayka> | ||||||
| Component: | JavaScriptCore | Assignee: | Alexey Shvayka <ashvayka> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Minor | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, nisl_grammarly1, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Attachments: |
|
||||||||
Created attachment 403037 [details]
Patch
(In reply to Alexey Shvayka from comment #1) > Created attachment 403037 [details] > Patch Warmed-up runs, --outer 48: r263638 patch array-indexOf-empty 221.3595+-2.9548 ^ 108.8428+-1.7148 ^ definitely 2.0338x faster typed-array-indexOf-empty 146.0446+-2.7547 ^ 115.9307+-1.8323 ^ definitely 1.2598x faster <geometric> 179.6698+-2.0843 ^ 112.2352+-1.1371 ^ definitely 1.6008x faster Comment on attachment 403037 [details]
Patch
r=me. Can you also ensure that DFG/FTL ArrayIndexOf follows to this?
Created attachment 403530 [details]
Patch
Add DFG/FTL stress test.
(In reply to Yusuke Suzuki from comment #3) > Comment on attachment 403037 [details] > Patch > > r=me. Can you also ensure that DFG/FTL ArrayIndexOf follows to this? ArrayIndexOf OSR exit via SpeculateInt32Operand at SpeculativeJIT::emitPopulateSliceIndex() if `fromIndex` parameter is an object. That's the reason of such performance boost. I've added a stress test to ensure ToInteger() after "length" order. Committed r263944: <https://trac.webkit.org/changeset/263944> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403530 [details]. *** Bug 216817 has been marked as a duplicate of this bug. *** |
%TypedArray%.prototype.{indexOf,lastIndexOf} are not spec-perfect