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

moonbitlang / core / 6921
90%

Build:
DEFAULT BRANCH: main
Ran 08 Oct 2026 12:46AM UTC
Jobs 1
Files 456
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

08 Oct 2026 12:43AM UTC coverage: 89.493% (-0.001%) from 89.494%
6921

push

github

web-flow
perf(json): presize the results of FromJson for Array, ArrayView and Map (#4303)

`FromJson for Array[X]` / `ArrayView[X]` built the result with an array
comprehension, which grows by pushing; the code's own TODO recorded the
~33% cost on nested arrays against the presized `mapi` it replaced.
Decode into `Array(capacity=a.length())` with push (a private
`decode_elements` shared by both), which keeps the shared `JsonPath`
node and leaves no uninitialised slots if an element fails. `FromJson
for Map[String, V]` now sizes the map from the object's length, as
`ToJson for Map` already does.

Release (json/from_json_bench_test.mbt), main -> this:

| bench                          | native        | js            | wasm-gc       |
|--------------------------------|---------------|---------------|---------------|
| Array[Array[Int]] 500x50       | 137 -> 102us  | 235 -> 234us  | 164 -> 133us  |
| Array[Double] n=10000          | 29.5 -> 26.1us| 35.3 -> 33.7us| 57.4 -> 35.6us|
| Map[String, Int] n=1000        | 66.0 -> 53.1us| 55.4 -> 42.4us| 38.4 -> 33.5us|

Codex review: "No blocking issues found. The helper preserves decoding order, error paths/messages, and ArrayView behavior; presizing resolves the TODO without exposing uninitialized elements."

Signed-off-by: Codex CLI <codex@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

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

16788 of 18759 relevant lines covered (89.49%)

344911.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6921.1 08 Oct 2026 12:46AM UTC 456
89.49
GitHub Action Run
Source Files on build 6921
  • Tree
  • List 456
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a2ecfb35 on github
  • Prev Build on main (#6917)
  • Next Build on main (#6927)
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