C++: Fix join orders in virtual dispatch computation#21591
Open
MathiasVP wants to merge 1 commit intogithub:mainfrom
Open
C++: Fix join orders in virtual dispatch computation#21591MathiasVP wants to merge 1 commit intogithub:mainfrom
MathiasVP wants to merge 1 commit intogithub:mainfrom
Conversation
…ges and inline pairCand to avoid a giant tuple explosion.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets performance in C/C++ virtual dispatch computation by improving transitive-closure and join-order behavior in TrackVirtualDispatch, aiming to reduce evaluation cost on large databases.
Changes:
- Replace
fastTC(edges/2)withdoublyBoundedFastTC(edges/2, isSource/1, isSink/1)foredgePlus. - Inline/restructure
pairCandcomputation by factoring outmostSpecificForSourceand addingbindingset/inline_lateto influence evaluation order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves the performance of C/C++'s virtual dispatch computation in two ways:
doublyBoundedFastTCinstead offastTC. We already have good bounds on the end-point so we might as well make use of them here.pairCandup front and then joining it with theedgePlusrelation we start by computingedgePlusand then we join it with the body ofpairCand. This has a major impact on large C/C++ databases at Microsoft (the time taken to compute virtual dispatch on a fresh DB is reduced by 10x in some cases).Before (canceled before completion):
After (
pairCandis now inlined):and then after a small join order fix: