Andrew Chow
3ff67f7783
Merge bitcoin/bitcoin#19690 : util: improve FindByte() performance
...
72efc26439 util: improve streams.h:FindByte() performance (Larry Ruane)
604df63f6c [bench] add streams findbyte (gzhao408)
Pull request description:
This PR is strictly a performance improvement; there is no functional change. The `CBufferedFile::FindByte()` method searches for the next occurrence of the given byte in the file. Currently, this is done by explicitly inspecting each byte in turn. This PR takes advantage of `std::find()` to do the same more efficiently, improving its CPU runtime by a factor of about 25 in typical use.
ACKs for top commit:
achow101:
re-ACK 72efc26439
stickies-v:
re-ACK 72efc26439
Tree-SHA512: ddf0bff335cc8aa34f911aa4e0558fa77ce35d963d602e4ab1c63090b4a386faf074548daf06ee829c7f2c760d06eed0125cf4c34e981c6129cea1804eb3b719
2023-05-10 17:50:42 -04:00
..
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-05-09 15:49:14 +02:00
2021-12-30 19:36:57 +02:00
2022-04-20 14:35:52 +01:00
2022-12-24 23:49:50 +00:00
2023-04-19 10:48:30 +02:00
2023-01-13 09:40:57 +00:00
2021-12-30 19:36:57 +02:00
2022-09-05 15:38:33 +02:00
2023-05-09 15:49:14 +02:00
2021-12-30 19:36:57 +02:00
2021-11-12 19:51:55 +00:00
2023-05-05 06:03:17 -06:00
2022-12-24 23:49:50 +00:00
2023-03-21 13:04:21 +00:00
2023-05-09 15:49:19 +02:00
2023-02-03 10:33:31 -05:00
2023-05-09 15:49:19 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-17 10:46:39 +01:00
2023-01-30 18:12:21 -05:00
2023-01-30 18:12:21 -05:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2023-05-09 15:49:14 +02:00
2023-04-19 10:48:30 +02:00
2022-12-13 15:08:24 -05:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2023-03-21 13:54:11 +01:00
2021-12-30 19:36:57 +02:00
2023-03-23 12:55:18 +01:00
2022-12-24 23:49:50 +00:00
2023-05-09 15:49:14 +02:00
2023-01-13 09:40:57 +00:00
2023-02-17 13:34:40 -05:00
2023-04-19 10:48:30 +02:00
2023-05-09 15:49:14 +02:00
2023-05-09 15:49:14 +02:00
2023-05-09 15:49:19 +02:00
2022-07-18 12:06:14 -06:00
2021-12-30 19:36:57 +02:00
2021-11-12 19:51:55 +00:00
2023-05-09 15:49:14 +02:00
2023-04-05 11:43:42 +01:00
2022-01-06 22:14:16 -05:00
2021-12-30 19:36:57 +02:00
2022-12-24 23:49:50 +00:00
2023-05-09 15:49:19 +02:00
2023-02-17 13:34:40 -05:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-05-09 15:49:14 +02:00
2023-04-04 18:33:08 +02:00
2021-12-30 19:36:57 +02:00
2023-05-09 15:49:14 +02:00
2023-01-23 17:29:41 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-03-23 19:38:38 +01:00
2023-05-09 15:49:14 +02:00
2023-01-26 10:44:05 +01:00
2023-05-09 15:49:14 +02:00
2023-05-09 15:49:14 +02:00
2023-01-13 09:40:57 +00:00
2022-12-24 23:49:50 +00:00
2021-10-05 11:10:37 +02:00
2023-05-09 18:47:14 +02:00
2023-01-13 09:40:57 +00:00
2021-12-30 19:36:57 +02:00
2022-12-13 15:08:24 -05:00
2023-05-09 15:49:14 +02:00
2021-11-12 19:51:55 +00:00
2023-05-09 15:49:19 +02:00
2023-05-09 15:49:19 +02:00
2023-05-09 15:49:14 +02:00
2021-11-12 19:51:55 +00:00
2022-12-13 15:08:24 -05:00
2023-01-13 09:40:57 +00:00
2023-05-09 15:49:14 +02:00
2023-04-04 12:33:49 +02:00
2023-04-19 10:48:30 +02:00
2023-05-09 15:49:14 +02:00
2021-12-30 19:36:57 +02:00
2021-11-12 19:51:55 +00:00
2023-05-09 15:49:14 +02:00
2023-01-26 10:44:05 +01:00
2023-01-26 10:44:05 +01:00
2023-05-02 17:17:06 +02:00
2023-01-26 10:36:18 +00:00
2021-12-30 19:36:57 +02:00
2022-12-24 23:49:50 +00:00
2023-05-09 15:49:19 +02:00
2023-05-09 15:49:14 +02:00
2023-05-09 15:49:14 +02:00
2023-05-09 15:49:19 +02:00
2023-05-09 15:49:14 +02:00