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

moonbitlang / core / 3911 / 1
94%
main: 94%

Build:
DEFAULT BRANCH: main
Ran 24 Apr 2026 01:54AM UTC
Files 357
Run time 8s
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 Apr 2026 01:53AM UTC coverage: 94.88%. Remained the same
3911.1

push

github

bobzhang
perf(argparse): thread ArrayView[String] through subcommand dispatch

Four `.to_owned()` calls in the parser hot path were eagerly
materializing an `Array[String]` from what downstream consumers accept
as `ArrayView[String]`:

- `default_argv()` returns the initial argv slice — `Command::parse`
  already declares its `argv?` parameter as `ArrayView[String]`.
- `parser.mbt` built two `rest` arrays (the help-subcommand path and
  the generic-subcommand dispatch path) only to pass them to
  `parse_command`, which also takes `ArrayView[String]`.
- `parser_lookup.mbt::split_long` was calling `to_owned()` on
  `ArrayView[StringView]` just to invoke `.join("=")`, which works
  directly on the view.

Returning / passing views saves one `Array` allocation per call. On a
program with nested subcommands, the dispatch path takes several of
these per invocation. `resolve_help_target` only needs pattern-match
and iteration over `argv`, which work on `ArrayView[String]` — changed
the private-signature's parameter type accordingly.

No mbti change: `default_argv` and `resolve_help_target` are private
`fn`s, and `parse_command` already accepted `ArrayView[String]`.

14750 of 15546 relevant lines covered (94.88%)

220716.28 hits per line

Source Files on job 3911.1
  • Tree
  • List 357
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 3911
  • 55a95d60 on github
  • Prev Job for on main (#3907.1)
  • Next Job for on main (#3913.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc