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

Chia-Network / chia_rs / 42015213492
82%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2026 11:03AM UTC
Jobs 3
Files 143
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

05 Nov 2026 10:59AM UTC coverage: 82.255% (+0.06%) from 82.2%
42015213492

push

github

web-flow
clvm-utils: memoize atom hashes in TreeCache (#1562)

* clvm-utils: memoize re-used long atoms in TreeCache

tree_hash_cached memoized pairs seen more than once but re-hashed atoms on
every reference. A tree like (L (L (L ...))), with one long atom L
referenced from many distinct pairs, re-hashed L once per pair, which is
quadratic in the input size.

Track heap atoms the same way as pairs: a parallel `atoms` Vec indexed by
atom index, with the same NOT_VISITED / SEEN_ONCE / SEEN_MULTIPLE
sentinels. visit_tree marks atoms of 55 bytes or more (shorter ones hash in
a single SHA-256 block), and an atom seen at least twice has its hash
stored on first compute and reused after. Hashes are unchanged.

* clvm-utils: merge visit_atom into TreeCache::visit

visit() now tracks pairs and heap atoms of ATOM_MEMOIZE_THRESHOLD bytes or
more, and returns true only for a pair on its first visit. visit_tree routes
the root and both children through it, so a long atom passed as the root is
tracked too and gets memoized across repeated tree_hash_cached calls sharing a
cache.

* clvm-utils: should_memoize is true only for SEEN_MULTIPLE

A slot below SEEN_MULTIPLE is an index into hashes, i.e. already memoized,
so it is no longer a candidate. tree_hash_cached only asks after get() has
returned None, so its behavior is unchanged.

---------

(cherry picked from commit 44b325c76)

97 of 97 new or added lines in 1 file covered. (100.0%)

17295 of 21026 relevant lines covered (82.26%)

11544305.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Linux release Cargo - 42015213492.1 05 Nov 2026 11:42AM UTC 141
75.16
GitHub Action Run
2 Linux dev Cargo - 42015213492.2 05 Nov 2026 11:03AM UTC 141
72.86
GitHub Action Run
3 Linux release pytest - 42015213492.3 05 Nov 2026 11:14AM UTC 117
59.58
GitHub Action Run
Source Files on build 42015213492
  • Tree
  • List 143
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42015213492
  • 6aa8cd03 on github
  • Prev Build on main (#41662535339)
  • Next Build on main (#42895295130)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc