benchmark: Add script to diagnose hypothesis performance regression (#32693)#37300
Closed
davidweb3-ctrl wants to merge 1 commit intocommaai:masterfrom
Closed
benchmark: Add script to diagnose hypothesis performance regression (#32693)#37300davidweb3-ctrl wants to merge 1 commit intocommaai:masterfrom
davidweb3-ctrl wants to merge 1 commit intocommaai:masterfrom
Conversation
…2693) This script helps diagnose the performance regression between hypothesis versions 6.47.0 and 6.103.1+ as reported in issue commaai#32693. Benchmark results show: - hypothesis 6.47.0: ~0.97s total - hypothesis 6.103.1: ~1.66s total (+72% slower) - st.data() multiple draws is the main bottleneck
Contributor
|
This PR has had no activity for 24 days. It will be automatically closed in 7 days if there is no activity. |
Contributor
|
This is missing:
|
Contributor
|
This PR has had no activity for 24 days. It will be automatically closed in 7 days if there is no activity. |
Contributor
|
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes. |
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.
Description
This PR addresses the performance regression reported in #32693 where hypothesis 6.103.1 is significantly slower than 6.47.0.
Root Cause Analysis
Through benchmarking, I identified that the main bottleneck is
st.data()with multipledata.draw()calls, which became ~83% slower in newer hypothesis versions:Changes
benchmark_hypothesis.py: Standalone script to measure hypothesis performance across versionsselfdrive/car/tests/benchmark_hypothesis_performance.py: Car-specific benchmarkUsage
Bounty
Contributes to resolving #32693 ($200 bounty)