hlo_reachability: reserve indices' storage at Build() time #63524
+1
−0
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.
hlo_reachability: reserve indices' storage at Build() time
name old time/op new time/op delta
BM_HloReachabilityBuild/1 165ns ± 0% 167ns ± 0% +0.88% (p=0.016 n=5+4)
BM_HloReachabilityBuild/64 6.27µs ± 1% 5.25µs ± 1% -16.18% (p=0.008 n=5+5)
BM_HloReachabilityBuild/128 12.9µs ± 3% 11.0µs ± 4% -15.11% (p=0.008 n=5+5)
BM_HloReachabilityBuild/256 27.3µs ± 2% 23.4µs ± 2% -14.06% (p=0.008 n=5+5)
BM_HloReachabilityBuild/512 60.0µs ± 2% 51.9µs ± 1% -13.55% (p=0.008 n=5+5)
BM_HloReachabilityBuild/4096 974µs ± 1% 901µs ± 1% -7.45% (p=0.008 n=5+5)
BM_HloReachabilityBuild/32768 42.5ms ± 1% 41.1ms ± 2% -3.17% (p=0.008 n=5+5)
BM_HloReachabilityBuild/262144 5.19s ±50% 11.10s ±159% ~ (p=0.548 n=5+5)