Repository navigation
structdiff: compare scalars and string maps without reflect allocations - #7205
Merged
Merged
Conversation
This was referenced Oct 27, 2026
Collaborator
Integration test reportCommit: 87b67a4
Top 6 slowest tests (at least 2 minutes):
|
denik
marked this pull request as ready for review
October 28, 2026 10:43
Leaves of basic kinds are compared directly instead of boxing both sides for reflect.DeepEqual, and map[string]string is compared natively; reflect copied every key and value to the heap. IsEqual on equal JobSettings goes from 198 allocations to 0, GetStructDiff from 560 to 356. Co-authored-by: Isaac <no-reply@databricks.com>
denik
force-pushed
the
denik/struct-diff-json
branch
from
October 28, 2026 10:44
c38b223 to
87b67a4
Compare
shreyas-goenka
approved these changes
Oct 28, 2026
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.
Cuts allocations in
structdiff.IsEqual(to zero for equal inputs) andGetStructDiff, with no change in output.reflect.DeepEqual.map[string]string(tags, spark_conf, ...) is compared natively; reflect copied every key and value to the heap.JobSettings fixtures (
go test -bench . -benchmem ./libs/structs/structdiff), median of 8:Related: #7206, #7207
This pull request and its description were written by Isaac.