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

For #314 (sonarlog) - Micro-optimize merge_streams #315

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

lars-t-hansen
Copy link
Collaborator

No description provided.

@lars-t-hansen lars-t-hansen marked this pull request as ready for review December 18, 2023 07:27
sonarlog/src/synthesize.rs Outdated Show resolved Hide resolved
sonarlog/src/synthesize.rs Outdated Show resolved Hide resolved
sonarlog/src/synthesize.rs Outdated Show resolved Hide resolved
@lars-t-hansen
Copy link
Collaborator Author

Output is bitwise identical to old code so let's ship it.

@lars-t-hansen
Copy link
Collaborator Author

BTW, perf results: for 1 month of data we see about 25% speedup on the sonalyze part of the code. For 3 months of data we see about 10% speedup - the quadratic algorithm bites back. Running perf locally, 60% of the time on the 1-month sample is still spent in merge_streams, slightly more of it in the first loop (the one that computes min_time), slightly less in the second. In both loops it's the first time comparison that is hottest - and this is exactly as expected in both cases.

@lars-t-hansen lars-t-hansen merged commit a1518a9 into main Dec 18, 2023
@lars-t-hansen lars-t-hansen deleted the larstha-314-faster-sonalyze branch December 18, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant