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

moonbitlang / core / 6772
89%

Build:
DEFAULT BRANCH: main
Ran 24 Sep 2026 07:47PM UTC
Jobs 1
Files 448
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

24 Sep 2026 07:43PM UTC coverage: 89.715% (+0.03%) from 89.69%
6772

push

github

web-flow
perf(regex): store a thread's mark slots in a mark-indexed array (#4270)

* perf(regex): store a thread's mark slots in a mark-indexed array

`MarkSlotMap` was an `@immut/sorted_map` per thread: `assign_slot` rebuilt
it with `map` for every thread on every transition and the state hash
walked it. Marks are dense small ids (two per capture group) that are never
removed, so the map is now a `FixedArray[Int]` indexed by mark (`-1` never
recorded, `0` recorded but unassigned, otherwise the slot index) plus a
`has_unassigned` flag that lets `assign_slot` return the same map for the
common threads that recorded nothing in the current step. Equal content
implies equal length, so the derived `Eq`/`Hash` compare content.
`find_slot` reads the array directly.

Native: construction of the 38-alternative pattern + 300 inputs
15.1 -> 14.1 ms, 34 short lines 4.40 -> 3.29 us, 40k `find` matches
4.66 -> 3.92 ms; scan loops unchanged. No interface change. Part of #4263.

Codex CLI review: "Both update methods copy before writing, so the shortcut
cannot corrupt shared thread or cached state data. No operation removes
marks; array length stays canonical. Content-based Eq/Hash and the derived
flag preserve equality semantics."

Signed-off-by: Codex CLI <codex@openai.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* micro optimization

---------

Signed-off-by: Codex CLI <codex@openai.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Wen Yuxiang <hackwaly@qq.com>

27 of 27 new or added lines in 3 files covered. (100.0%)

16504 of 18396 relevant lines covered (89.72%)

313903.28 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6772.1 24 Sep 2026 07:47PM UTC 448
89.72
GitHub Action Run
Source Files on build 6772
  • Tree
  • List 448
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9e76899c on github
  • Prev Build on main (#6769)
  • Next Build on main (#6775)
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