Bug 230864 - Speed up setting JSFunction's "prototype" property
Summary: Speed up setting JSFunction's "prototype" property
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Enhancement
Assignee: Alexey Shvayka
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-27 15:36 PDT by Alexey Shvayka
Modified: 2021-09-28 06:38 PDT (History)
8 users (show)

See Also:


Attachments
Patch (11.69 KB, patch)
2021-09-27 15:40 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff
Patch for landing (11.66 KB, patch)
2021-09-28 06:07 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Shvayka 2021-09-27 15:36:17 PDT
Speed up setting JSFunction's "prototype" property
Comment 1 Alexey Shvayka 2021-09-27 15:40:00 PDT
Created attachment 439403 [details]
Patch
Comment 2 Alexey Shvayka 2021-09-27 15:41:54 PDT
(In reply to Alexey Shvayka from comment #1)
> Created attachment 439403 [details]
> Patch

                                             r283094                   patch

class-derived-creation                   38.2295+-0.3351     ^     36.3643+-0.6771        ^ definitely 1.0513x faster
class-creation                           38.2074+-0.7942     ^     27.4249+-0.4214        ^ definitely 1.3932x faster
function-prototype-put-non-reified       80.5426+-1.2450     ^     28.4549+-0.4999        ^ definitely 2.8305x faster
function-prototype-put-reified           29.1429+-0.4759     ^     25.6151+-0.3548        ^ definitely 1.1377x faster

<geometric>                              42.9347+-0.3383     ^     29.1322+-0.2186        ^ definitely 1.4738x faster
Comment 3 Yusuke Suzuki 2021-09-27 18:32:22 PDT
Comment on attachment 439403 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=439403&action=review

r=me

> Source/JavaScriptCore/runtime/JSFunction.cpp:299
> +constexpr unsigned prototypeAttributesForNonClass = PropertyAttribute::DontEnum | PropertyAttribute::DontDelete;

Let's put `static` too.
Comment 4 Alexey Shvayka 2021-09-28 06:07:07 PDT
Created attachment 439466 [details]
Patch for landing
Comment 5 Alexey Shvayka 2021-09-28 06:08:32 PDT
(In reply to Yusuke Suzuki from comment #3)
> > Source/JavaScriptCore/runtime/JSFunction.cpp:299
> > +constexpr unsigned prototypeAttributesForNonClass = PropertyAttribute::DontEnum | PropertyAttribute::DontDelete;
> 
> Let's put `static` too.

Done. I appreciate the review!
Comment 6 EWS 2021-09-28 06:37:25 PDT
Committed r283167 (242215@main): <https://commits.webkit.org/242215@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439466 [details].
Comment 7 Radar WebKit Bug Importer 2021-09-28 06:38:18 PDT
<rdar://problem/83620218>