Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34046. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste |
d41c5c4 to
031ee0b
Compare
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
|
Code Review ACK 031ee0b22c4ee4f04f66cb8f0be534b404dbe73c The new benchmark is more realistic |
031ee0b to
464ee9e
Compare
maflcko
left a comment
There was a problem hiding this comment.
lgtm 464ee9e26f7851ff27c2d18f807ae64c8dd0fc62, but I'd prefer to not use the low-level buffer writing questionable "optimization"
The current benchmark doesn't represent a realistic scenario: * it only checks 200 bytes, while in reality we have 8 MB: https://github.com/bitcoin/bitcoin/blob/2c44c41984e0a170cf38d595635a9e861854573c/src/validation.cpp#L5009 * it only checks the very last position (which is basically the missing case), while in reality it's a circular buffer, so the magic bytes can be anywhere * plain array was needlessly serialized instead of written directly The benchmark was updated to start from different file positions and iterate with a stride of ~32kb to exercise a few "random" places.
464ee9e to
93941dc
Compare
|
review ACK 93941dc 🐪 Show signatureSignature: |
|
re ACK 93941dc |
|
(close/open dance to fix boost download issue) |
93941dc to
35386df
Compare
FindByte across block-sized bufferFindByte benchmark
|
Decided to remove this benchmark instead of updating it - seeing that actual |
|
Concept NACK. The existence of a benchmark does not imply it's worth efforts for improving the code further. It's still useful to see it doesn't regress. It's not that we don't care about |
35386df to
93941dc
Compare
|
Thanks for the feedback @sipa, I have reverted the previous version which checks multiple positions. |
FindByte benchmarkFindByte across block-sized buffer
|
I'll try something else, closing for now |
The benchmark was updated to start from different file positions and iterate with a stride of ~32kb to exercise a few "random" places.
Found while reviewing #34044
Note: this PR started off as making
FindBytemore realistic, but based on #34044 (comment) I decided to remove it, and after #34046 (comment) it was reverted to its original state