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

moonbitlang / core / 8017
87%

Build:
DEFAULT BRANCH: main
Ran 09 Nov 2026 12:13AM 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:10AM UTC coverage: 88.466% (+0.005%) from 88.461%
8017

push

github

bobzhang
perf(builtin): scan 16 code units per step in contains_code_unit and the to_lower/to_upper range scan

`string_contains_code_unit` (behind `contains_code_unit` and one-unit
`contains`) and `find_ascii_range_code_unit_simd` (the "is there anything to
convert" scan of `to_lower`/`to_upper`) already tested each 8-lane vector
with `v128_any_true`, one vector per iteration. Load two vectors per
iteration and test their OR with one `any_true`. A hit in the range scan is
located by the existing scalar scan, now over the 16-unit block. One more
8-unit vector covers a remaining 8..15 code units, and the scalar tail is
unchanged. Native and wasm only; js and wasm-gc are untouched.

This is the unrolling half of moonbitlang/core#4770. Splitting that change
showed unrolling on top of an existing `any_true` test is where most of the
long-input gain comes from (native rev_find 1.01x -> 0.58x).

Median of 3 alternating rounds (native `to_lower` rows: 4 further rounds,
see below), `moon bench --release`, arm64 (new/old):

                                       native   wasm
  contains_code_unit absent n=4096      0.56    0.80
  contains_code_unit absent n=256       0.71    0.90
  contains_code_unit present@end n=256  0.69    0.91
  StringView contains_code_unit n=256   0.80    0.92
  contains_code_unit absent n=8..64     0.86-0.98  0.97-1.01
  contains_code_unit present@0 n=8/256  1.03/1.01  1.02/1.05
  to_lower no-change long               0.68    0.67
  StringView::to_lower no-change long   0.83    0.67
  to_lower late-uppercase               0.82    0.87
  other to_lower rows (see below)       0.99-1.06  0.99-1.00

Native `to_lower` rows were re-run for 4 more alternating rounds after the
Codex review measured two of them 7-8% slower in a single pair. Rows whose
input starts with an uppercase letter (long, sparse, one-unit runs,
all-uppercase, StringView long) return before the changed loop runs. Their
per-round means scatter between ~91 and ~97 ns in both version... (continued)

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

25304 of 28603 relevant lines covered (88.47%)

425359.08 hits per line

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