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

moonbitlang / core / 5796
90%

Build:
DEFAULT BRANCH: main
Ran 07 Aug 2026 02:59AM UTC
Jobs 1
Files 463
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

07 Aug 2026 02:57AM UTC coverage: 90.321% (+0.009%) from 90.312%
5796

push

github

bobzhang
perf(string): back code unit range comparison with %string.unsafe_range_equal

Add a private `String::unsafe_range_equal` primitive, annotated with
`#intrinsic("%string.unsafe_range_equal")` and `#borrow`, mirroring the
existing `Bytes::unsafe_range_equal`. The MoonBit body is the fallback for
backends without the intrinsic; on native it lowers to a single `memcmp`.

Route the hand-rolled code unit loops through it: `StringView::has_prefix`,
`StringView::has_suffix`, `Eq for StringView` and
`StringView::equal_to_string`.

`has_prefix`/`has_suffix` compare the anchor code unit inline before the
call, because rejecting there is the common case and is cheaper than the
range-compare call overhead.

The `find`/`rev_find` two-anchor middle check is deliberately left on the
inline early-exit loop: its ranges are short and usually mismatch early, so
the call overhead dominates.

25 of 0 new or added lines in 0 files covered. (NaN%)

10 existing lines in 3 files now uncovered.

16228 of 17967 relevant lines covered (90.32%)

168740.04 hits per line

Coverage Regressions

Lines Coverage ∆ File
7
97.92
0.08% builtin/string_methods.mbt
2
99.14
0.0% builtin/stringview.mbt
1
99.13
0.02% builtin/string.mbt
Jobs
ID Job ID Ran Files Coverage
1 5796.1 07 Aug 2026 02:59AM UTC 464
90.34
GitHub Action Run
Source Files on build 5796
  • Tree
  • List 463
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d7c68d07 on github
  • Prev Build on main (#5794)
  • Next Build on main (#5798)
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