Commit 768e298
libsolutil: append SHA-256 input via vector::insert
picosha2::hash256_one_by_one::process appends its input range to the
internal buffer with std::copy + std::back_inserter, producing O(N)
individual push_back calls (one capacity check per byte). For the
random-access iterators this template is used with, vector::insert at
the end is equivalent and does a single resize + bulk copy.
Functional behavior is unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 68d1a77 commit 768e298
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
0 commit comments