Bug 162142 - [JSC] Use is_cell_with_type for @isRegExpObject, @isMap, and @isSet
Summary: [JSC] Use is_cell_with_type for @isRegExpObject, @isMap, and @isSet
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on: 162132
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-18 23:35 PDT by Yusuke Suzuki
Modified: 2016-09-19 11:48 PDT (History)
5 users (show)

See Also:


Attachments
Patch (16.05 KB, patch)
2016-09-19 11:04 PDT, Yusuke Suzuki
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2016-09-18 23:35:04 PDT
This may offer performance benefit!
Comment 1 Yusuke Suzuki 2016-09-19 11:04:56 PDT
Created attachment 289242 [details]
Patch
Comment 2 Yusuke Suzuki 2016-09-19 11:09:02 PDT
# Baseline
Air
firstIteration:     73.81 ms +- 0.92 ms
averageWorstCase:   41.55 ms +- 0.78 ms
steadyState:        3492.46 ms +- 14.59 ms
summary:            157.36 ms +- 1.30 ms

Basic
firstIteration:     35.94 ms +- 0.42 ms
averageWorstCase:   20.46 ms +- 0.82 ms
steadyState:        1966.58 ms +- 18.93 ms
summary:            157.32 ms +- 1.29 ms

# Patched
Air
firstIteration:     74.32 ms +- 1.70 ms
averageWorstCase:   41.54 ms +- 0.77 ms
steadyState:        3451.03 ms +- 16.79 ms
summary:            156.78 ms +- 1.32 ms

Basic
firstIteration:     36.60 ms +- 0.56 ms
averageWorstCase:   20.03 ms +- 0.76 ms
steadyState:        1940.35 ms +- 15.14 ms
summary:            156.71 ms +- 1.32 ms
Comment 3 Michael Saboff 2016-09-19 11:20:35 PDT
Comment on attachment 289242 [details]
Patch

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

r=me.

> Source/JavaScriptCore/ChangeLog:10
> +        Previously, they are implemented as functions and only @isRegExpObject
> +        is handled in DFG and FTL.

Use past tense throughout the sentence.  I suggest "Previously, they were implemented as functions and only @isRegExpObject was handled in the DFG and FTL."

> Source/JavaScriptCore/ChangeLog:12
> +        Recent op_is_cell_with_type and DFG IsCellWithType node allow us
> +        to implement the above ones in all the JIT tiers easily.

Awkward wording.  Suggest - "The recently added op_is_cell_with_type bytecode and DFG IsCellWithType node allows us to simplify the above checks in all JIT tiers."

> Source/JavaScriptCore/ChangeLog:13
> +        We change above ones to bytecode intrinsic and emit op_is_cell_with_type.

I suggest changing this sentence to "Changed these checks to bytecode intrinsics using op_is_cell_with type."
Comment 4 Yusuke Suzuki 2016-09-19 11:45:21 PDT
Comment on attachment 289242 [details]
Patch

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

Thank you so much!

>> Source/JavaScriptCore/ChangeLog:10
>> +        is handled in DFG and FTL.
> 
> Use past tense throughout the sentence.  I suggest "Previously, they were implemented as functions and only @isRegExpObject was handled in the DFG and FTL."

Fixed.

>> Source/JavaScriptCore/ChangeLog:12
>> +        to implement the above ones in all the JIT tiers easily.
> 
> Awkward wording.  Suggest - "The recently added op_is_cell_with_type bytecode and DFG IsCellWithType node allows us to simplify the above checks in all JIT tiers."

Fixed.

>> Source/JavaScriptCore/ChangeLog:13
>> +        We change above ones to bytecode intrinsic and emit op_is_cell_with_type.
> 
> I suggest changing this sentence to "Changed these checks to bytecode intrinsics using op_is_cell_with type."

Fixed.
Comment 5 Yusuke Suzuki 2016-09-19 11:48:24 PDT
Committed r206104: <http://trac.webkit.org/changeset/206104>