mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
util: improve streams.h:FindByte() performance
Avoid use of the expensive mod operator (%) when calculating the buffer offset. No functional difference. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,7 @@ static void FindByte(benchmark::Bench& bench)
|
||||
|
||||
bench.run([&] {
|
||||
bf.SetPos(0);
|
||||
bf.FindByte(1);
|
||||
bf.FindByte(std::byte(1));
|
||||
});
|
||||
|
||||
// Cleanup
|
||||
|
||||
Reference in New Issue
Block a user