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

moonbitlang / core / 7234
87%

Build:
DEFAULT BRANCH: main
Ran 23 Oct 2026 03:03AM UTC
Jobs 1
Files 447
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

23 Oct 2026 03:01AM UTC coverage: 89.473%. Remained the same
7234

push

github

bobzhang
perf(set): mark entries as cycle-free

`Set`'s `Entry` has a mutable `next` that points back to `Entry`, so the
compiler treats it as cycle-capable. With trial deletion enabled, every
release of an entry that does not free it registers a possible cycle root,
and the collector walks the insertion-order chain from those roots. On the
core bench dashboard this made `Set::filter n=50000` 10.8x slower on native
and 8.5x slower on wasm once `MOON_COLLECT_REF_CYCLE=1` was turned back on.

The `next` links form a simple list that cannot loop back: only
`add_entry_to_tail` points a `next` at an entry, and only at the entry being
appended. This is the same structure as builtin `Map`'s `Entry`, which is
already `#unsafe_cycle_free`. The type comment records why the attribute
holds and when it must be removed.

With cycle collection on (same machine, same toolchain):

| benchmark                    | native before | native after | wasm before | wasm after |
|------------------------------|---------------|--------------|-------------|------------|
| Set::filter n=50000          | 3.65 ms       | 354 us       | 6.12 ms     | 787 us     |
| Set::add n=50000             | 8.52 ms       | 2.49 ms      | 5.61 ms     | 3.96 ms    |
| Set::union Int 10k           | 2.12 ms       | 559 us       |             | 904 us     |
| Set::intersection String 10k | 1.16 ms       | 340 us       |             | 622 us     |

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

16778 of 18752 relevant lines covered (89.47%)

316431.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7234.1 23 Oct 2026 03:03AM UTC 447
89.47
GitHub Action Run
Source Files on build 7234
  • Tree
  • List 447
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ddf7bbb3 on github
  • Prev Build on main (#7229)
  • Next Build on main (#7238)
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