Bug 161741 - GetByIdWithThis/GetByValWithThis should be faster when monomorphic than when polymorphic
Summary: GetByIdWithThis/GetByValWithThis should be faster when monomorphic than when ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-08 09:49 PDT by JF Bastien
Modified: 2020-01-24 09:18 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JF Bastien 2016-09-08 09:49:56 PDT
Follow-up to https://bugs.webkit.org/show_bug.cgi?id=160922

The above patch added value profiling to the two opcodes, they got faster, but the new tests have odd behavior:


$ ./Tools/Scripts/run-jsc-benchmarks old:./before/bin/jsc new:./current/bin/jsc --benchmarks "super-get-by-" --microbenchmarks --outer 400

                                                   old                       new                                        

super-get-by-id-with-this-monomorphic        29.3852+-0.2030     ^     27.1366+-0.1896        ^ definitely 1.0829x faster
super-get-by-id-with-this-polymorphic        27.0021+-0.2115     ^     25.6205+-0.1965        ^ definitely 1.0539x faster
super-get-by-val-with-this-monomorphic       29.8851+-0.1339     ^     28.9029+-0.1612        ^ definitely 1.0340x faster
super-get-by-val-with-this-polymorphic       27.6204+-0.1616     ?     27.8924+-0.2388        ?

<geometric>                                  28.4117+-0.0838     ^     27.3187+-0.0971        ^ definitely 1.0400x faster


I'd expect monomorphic to be faster than polymorphic, for both test, before as well as after the patch. The patch isn't a regression (poly was faster than mono before it), but we should investigate why this is happening. The difference seems to be that there were many more exits in mono than poly as shown by the profile from that patch:

  https://bugs.webkit.org/attachment.cgi?id=287636