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

moonbitlang / core / 8019
87%

Build:
DEFAULT BRANCH: main
Ran 09 Nov 2026 12:23AM UTC
Jobs 1
Files 686
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

09 Nov 2026 12:20AM UTC coverage: 88.505% (+0.04%) from 88.466%
8019

push

github

bobzhang
perf(builtin): test two vectors per step in the two-anchor candidate scanners

The candidate prefilters behind multi-unit `String`/`StringView`
`find`/`rev_find` (`find_two_anchor_candidate_from_string` and its reverse)
short-pattern `Bytes`/`BytesView` `find` (`find_short_candidate_from_bytes`)
and multi-byte `Bytes`/`BytesView` `rev_find` of every pattern length
(`rev_find_short_candidate_from_bytes`) compared the first and
last pattern units against one vector of candidate positions per iteration
and built a bitmask for every block. Compare two vectors per iteration
instead, OR the two candidate masks and test them with one `any_true`; the
bitmask is built only on a hit. One more vector covers a remaining 8..15
(String) or 16..31 (Bytes) candidates, and the scalar tail is unchanged.
Native and wasm only; js keeps `indexOf`/`lastIndexOf` for String and the
scalar Bytes scan, and wasm-gc is unchanged.

Same technique as moonbitlang/core#4770 / #4771: on native the gain needs
both the unrolling and the shared `any_true` test.

Median of 3 alternating rounds, `moon bench --release`, arm64 (new/old):

                                              native     wasm
  BytesView substring find, n=4096 (3 rows)   0.63-0.65  0.65
  BytesView substring rev_find, n=4096 (4)    0.59       0.67-0.68
  String find two anchors absent n=4096       0.84       0.64
  String rev_find two anchors absent n=4096   0.78       0.65
  String find/rev_find two anchors n=256      0.85-0.91  0.79-0.82
  String two anchors absent n=24/40           0.86-0.95  0.94-0.98
  dense false positives n=256 (verify-bound)  1.00       1.00/1.03
  BytesView substring miss n=32               0.96       1.07

Known small deltas on wasm: `BytesView::find` substring miss n=32 is ~2-3 ns
(5-7%; ~4.8% in the Codex rerun) slower although old and new do the same work on it (one vector plus a
12-byte scalar tail), so it is consistent with code layout; rev_find dense
false positives n=256 is ~3% slowe... (continued)

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

25354 of 28647 relevant lines covered (88.5%)

435216.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8019.1 09 Nov 2026 12:23AM UTC 686
88.5
GitHub Action Run
Source Files on build 8019
  • Tree
  • List 686
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • acad3c74 on github
  • Prev Build on main (#8017)
  • Next Build on main (#8029)
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