Commit ced4b9c
committed
Merge rust-bitcoin#4969: perf: optimize Vec creation in bip152 tests
22b4331 perf: optimize Vec creation in bip152 tests (Conger Rassen)
Pull request description:
Replace `[0u8; 32].to_vec()` with `vec![0u8; 32]` to avoid unnecessary intermediate array allocation on the stack. The `vec!` macro directly allocates on the heap, eliminating the copy operation and improving both memory usage and performance.
ACKs for top commit:
apoelstra:
ACK 22b4331; successfully ran local tests
Tree-SHA512: db19d32643377a740a223f2058b66534a0955cff2c0c3e6013b9e31afa28f16527775d43a690dc9cfe95fd7a0a2a25b88ef89b6365f80e3d8e75aaacbdb46f671 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| |||
0 commit comments