Conversation
…ng() Step() marked a partition as non-overlapping by checking each start against the previous end. That misses an instant at t followed by another row at t (a second instant, or an interval starting at t), which IsOverlapping() treats as overlapping. So unify places that need to check for overlapping while accounting for instants with a single source of truth, IsOverlapping().
Add PushPartitionNonOverlapping to construct intervals using k-pointers approach, improving runtime from O(k*n*log(n)) time and O(n) memory to O(k*n) time and O(1) extra memory, where k is number of tables and n the total number of input intervals. This approach only works if all intervals being intersected are non-overlapping, and the overlapping intervals fallback to current algorithm with a tree. AFAICT, in practice, quite a few intervals are non-overlapping (e.g. cpu_freq, cpu_idle, sched, etc.). Speedup results: - Wattson 11-way intersect (wattson_tk4_pcmark.pb 32s): 205ms -> 124ms (1.65x) - ii(cpu0_freq, cpu0_idle) (Fitbit_2.pb 40min): 175ms -> 134ms (1.23x) Bug: 354290668
🎨 Perfetto UI Builds & Tests
|
This branch has not been deployed
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.
Add PushPartitionNonOverlapping to construct intervals using k-pointers
approach, improving runtime from O(knlog(n)) time and O(n) memory to
O(k*n) time and O(1) extra memory, where k is number of tables and n the
total number of input intervals.
This approach only works if all intervals being intersected are
non-overlapping, and the overlapping intervals fallback to current
algorithm with a tree. AFAICT, in practice, quite a few intervals are
non-overlapping (e.g. cpu_freq, cpu_idle, sched, etc.).
Speedup results:
Bug: 354290668