-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Remove some suspicious cast truncations #110367
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2159,9 +2159,7 @@ where | |
}; | ||
|
||
Hash::hash(&TAG_VALID_SPAN, hasher); | ||
// We truncate the stable ID hash and line and column numbers. The chances | ||
// of causing a collision this way should be minimal. | ||
Hash::hash(&(file.name_hash as u64), hasher); | ||
Hash::hash(&file.name_hash, hasher); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like this actually has a perf effect after all. The benchmarked version was merging the two u64s of the stable hash and hashing the resulting u64. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This landed out of order. The PR that makes this not a regression: #110410 is still in queue |
||
|
||
// Hash both the length and the end location (line/column) of a span. If we | ||
// hash only the length, for example, then two otherwise equal spans with | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably look into changing this to print the full fingerprint.