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

moonbitlang / async / 378
78%

Build:
DEFAULT BRANCH: main
Ran 29 May 2026 09:26AM UTC
Jobs 1
Files 143
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

29 May 2026 09:23AM UTC coverage: 77.656% (+0.005%) from 77.651%
378

push

github

Guest0x0
perf(event_loop): short-circuit timer scan when no timers are pending

EventLoop::wait_for_event runs twice per scheduler tick:

  1. self.timers.iter().head() to compute the poll.wait timeout
  2. for timer in self.timers to fire any expired timer callbacks

When the program does no timer work (IO-only loops, pure compute via
pause, queue producer/consumer loops, etc.) the timers SortedSet is
empty but the two iterator-creation and ms_since_epoch() calls still
fire on every tick. A callgrind profile of a pure-pause workload
(single coroutine, pause() x 2.5M) attributes ~7% of all instructions
executed to the timer scan.

Gate both spots on self.timers.is_empty(). When timers are pending the
extra branch is cheap; when they are not, the entire iterator
allocation + ms_since_epoch + loop setup drops out.

pause_loop bench (native, 3-run median):
  baseline: 637 ms
  patched : 469 ms  (-26.4%)

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

3326 of 4283 relevant lines covered (77.66%)

78646.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 378.1 29 May 2026 09:26AM UTC 143
77.66
GitHub Action Run
Source Files on build 378
  • Tree
  • List 143
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 717ce71f on github
  • Prev Build on main (#376)
  • Delete
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