Bug 242571

Summary: Explore skipping fastStringify for a while if it’s been failing repeatedly
Product: WebKit Reporter: Darin Adler <darin>
Component: JavaScriptCoreAssignee: Darin Adler <darin>
Status: RESOLVED WONTFIX    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Description Darin Adler 2022-07-10 06:03:29 PDT
Some tests in Speedometer2 are slower because they try the stringify fast path over and over again and it doesn't work. We should assume that if we call stringify repeatedly it is likely the calls will either all work with the fast path or all fail. We can create a heuristic where each time the stringify fast path fails we don’t try it again for some number of subsequent calls. That way if we are repeatedly doing calls that work with the fast path we'll keep using it every time, and if we are repeatedly doing calls that don't work with the fast path we'll only try it some small percentage of the time.

We can judge this heuristic with Speedometer2 itself, but it's likely the heuristic will also be effective on web content in the wild.
Comment 1 Darin Adler 2022-07-11 08:51:52 PDT
My first try at this did not help significantly, so I think I’ll drop this.
Comment 2 Radar WebKit Bug Importer 2022-07-17 06:04:15 PDT
<rdar://problem/97151013>