• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-bitcoin / rust-bitcoin / 15002737639
83%

Build:
DEFAULT BRANCH: master
Ran 13 May 2025 05:18PM UTC
Jobs 1
Files 130
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 May 2025 05:16PM UTC coverage: 84.539% (+0.003%) from 84.536%
15002737639

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#4485: Add `Builder::with_capacity()`

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/d003d4859251abb01929ccab6009a02e0c96b0cd">d003d4859<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/bc93498b3e2a8bbd912afbbdfaa10d572c015ab8"> Add `Builder::with_capacity()` (Daniel Roberts)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/e492f94289887b50d0c10f976830d4fbf48d5866">e492f9428</a> Update `ScriptBuf::with_capacity` docs (Daniel Roberts)

Pull request description:

  Enable the creation of `bitcoin::script::Builder` with a preallocated capacity.

  This is pretty minor, but it provides a small speedup if used correctly. I've observed a 0.4% speedup and a 0.7% speedup in two code bases that create lots of outputs (on the order of tens to hundreds of thousands). It provided a much larger speedup (5% or so) in the latter code base before some other optimizations dwarfed it.

  I have a branch that also uses it for `ScriptBufExt::new_*()` but while it provides a small performance improvement for all script types except one, `ScriptBufExt::new_p2tr()` actually causes a small performance regression. Since the only use case I have for creating lots and lots of scripts is in taproot with CHECKTEMPLATEVERIFY, I'm holding back that change if/until I figure out what's going on exactly (and hopefully resolve it).

ACKs for top commit:
  tcharding:
    ACK d003d4859251abb01929ccab6009a02e0c96b0cd
  apoelstra:
    ACK d003d4859251abb01929ccab6009a02e0c96b0cd; successfully ran local tests

Tree-SHA512: 51137574c093a5636afc7d28fee343f8e9a

6 of 6 new or added lines in 2 files covered. (100.0%)

23223 of 27470 relevant lines covered (84.54%)

16102.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 15002737639.1 13 May 2025 05:18PM UTC 130
84.54
GitHub Action Run
Source Files on build 15002737639
  • Tree
  • List 130
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15002737639
  • bc93498b on github
  • Prev Build on master (#15002062995)
  • Next Build on master (#15009237027)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc