Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift: Add nomagic to Pattern.getMatchingExpr #15348

Merged
merged 1 commit into from Jan 17, 2024

Conversation

MathiasVP
Copy link
Contributor

This gets rid of the expensive magic here:

OIN `m#Pattern::Pattern.getMatchingExpr/0#a063c6af#bf#prev_delta` WITH `_Element::Generated::Element.getResolveStep/0#dispred#f0bb72ef_0#antijoin_rhs_Element::Generated::El__#join_rhs#2` ON FIRST 1 OUTPUT Rhs.1
                    
      399       ~1%    {1} r2 = JOIN `m#Pattern::Pattern.getMatchingExpr/0#a063c6af#bf#prev_delta` WITH `_Element::Generated::Element.getResolveStep/0#dispred#f0bb72ef_0#antijoin_rhs_Element::Generated::El__#join_rhs#1` ON FIRST 1 OUTPUT Rhs.1
                    
        54       ~0%    {1} r3 = JOIN `m#Pattern::Pattern.getMatchingExpr/0#a063c6af#bf#prev_delta` WITH `_Element::Generated::Element.getResolveStep/0#dispred#f0bb72ef_0#antijoin_rhs_Element::Generated::El__#join_rhs` ON FIRST 1 OUTPUT Rhs.1
                    
      1784       ~0%    {2} r4 = JOIN `m#Pattern::Pattern.getMatchingExpr/0#a063c6af#bf#prev_delta` WITH `TuplePattern::Generated::TuplePattern.getElement/1#dispred#6d8fa592_201#join_rhs` ON FIRST 1 OUTPUT Rhs.2, Rhs.1
  8436693      ~78%    {2}    | JOIN WITH `TupleExpr::Generated::TupleExpr.getImmediateElement/1#dispred#96eaeafe_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
                        {2}    | AND NOT `Expr::Expr.getResolveStep/0#dispred#4ec712a3_0#antijoin_rhs`(FIRST 1)
  8436655  ~906650%    {1}    | SCAN OUTPUT In.1
                    
  8488265   ~21502%    {1} r5 = r1 UNION r2 UNION r3 UNION r4
  3846965    ~7170%    {1}    | AND NOT `m#Pattern::Pattern.getMatchingExpr/0#a063c6af#bf#prev`(FIRST 1)
                        return r5

This was identified by the join-order analysis on the DCA run from this PR.

@MathiasVP MathiasVP requested a review from a team as a code owner January 17, 2024 07:59
@github-actions github-actions bot added the Swift label Jan 17, 2024
@MathiasVP MathiasVP added the no-change-note-required This PR does not need a change note label Jan 17, 2024
@geoffw0
Copy link
Contributor

geoffw0 commented Jan 17, 2024

Change LGTM. We should wait for the DCA run to finish...

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCA LGTM (overall speedup perhaps; Pattern::Pattern.getMatchingExpr has disappeared from the stage timings and join order badness reports).

@MathiasVP MathiasVP merged commit b7a7963 into github:main Jan 17, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants