Current Motoko and RSX Heavy16
This compares freshly built, ordinary canisters on the same traced PocketIC server. It uses the current Motoko source, including its local bounded ICWire optimizations, and RSX with workflow clocks started at deferred admission. Neighboring repositories were read-only. Both use the timer-backed scheduler with a cooperative 500M instruction cutoff.
Both runs passed exact work, final publication and trace validation. RSX uses 2.67× as many complete instructions despite 5.3% less reported heap-page charging. Its remaining execution charges are 4.46× Motoko's; page placement alone cannot close this gap.
| Complete Heavy16 | Current Motoko | RSX, admission-time clocks |
|---|---|---|
| Total instructions | 144.742B | 386.486B |
| Included heap-page instructions | 73.757B | 69.844B |
| Remaining execution instructions | 70.985B | 316.643B |
| Primary + publication/maintenance rounds | 47 + 0 | 63 + 1 |
| Simulated time through complete drain | 28.2s | 38.4s |
| Endpoint deliveries/s | 6,383 | 4,688 |
| Blocks/s | 979 | 719 |
| Workflow latency p50 / p95 / max | 4.8 / 10.8 / 19.8s | 19.8 / 27.6 / 31.2s |
| Peer batch calls | 2,325 | 2,396 |
| All 18,000 ingress calls: mean instructions | 1.439M | 1.156M |
| Accessed / dirty 64 KiB regions, summed per execution | 602,906 / 319,054 | 477,868 / 395,177 |
| Finished replicated entries / errors | 30,387 / 0 | 24,967 / 0 |
| Observed whole-workload cycles | 494.844B | 954.051B |
| Fleet logical Wasm capacity after drain | 3,072 MiB | 626.4375 MiB |
| Fleet logical stable capacity after drain | 144 MiB | 1 MiB |
| Wasm artifact bytes | 4,303,239 | 4,718,407 |
Capacity is grown linear memory, including unused space and possible garbage;
it is not live payload or physical resident RAM. The ingress mean covers whole
start entries; deferred workflow work belongs to the complete totals. No first
call or expensive GC entry was dropped.
The earlier RSX timer control (325e1dba, receipt-time clocks, 176-byte records)
used 387.048B instructions and 62 complete rounds. The correction changes total
instructions by −0.145%, heap-page charges by −0.845%, and the remaining charges
by +0.0105%; completion takes two more rounds. This is a timing/representation
correction, not a claimed throughput optimization. Both old and new results
include all completed work and the ordinary tail.
Where the measured work runs
These are whole execution envelopes, not isolated algorithm timers. The runtimes partition work differently, so entries across rows are not equivalent units of work. Reply rows include self-call and peer callbacks; no invented mapping from callback table indices to application phases is used.
| Runtime / observed entry | Complete instructions | Included heap pages | Entries |
|---|---|---|---|
| Motoko async helpers | 82.098B | 21.890B | 3,625 |
Motoko ingress start |
25.900B | 25.228B | 18,000 |
| Motoko reply callbacks | 21.023B | 19.048B | 5,950 |
Motoko reactor_receive |
15.236B | 7.114B | 2,325 |
| Motoko global timer | 0.485B | 0.478B | 487 |
RSX reactor_turn |
313.474B | 28.725B | 642 |
| RSX timer executor | 23.132B | 1.270B | 237 |
RSX reactor_receive |
21.206B | 12.099B | 2,396 |
RSX ingress start |
20.799B | 20.416B | 18,000 |
| RSX reply callbacks | 7.595B | 7.058B | 3,275 |
| RSX global timer | 0.280B | 0.276B | 417 |
The largest remaining target is inside RSX scheduled work:
reactor_turn alone costs 284.749B instructions after its reported page component
is removed. This trace does not split those charges among Store, workflow logic,
codecs, allocation and other IC operations. A focused phase profile is needed
before attributing that residual to any one subsystem.
Matched work and observation
Both runs use 16 same-subnet canisters, 1,000 offered roots/s for thirty 600ms rounds, 1,024 batch items, 1,900,000 batch bytes, concurrency 4,096 and 40 callback units. The seven workflow JSON documents match byte for byte. The heavy mix has twelve Fanout roots, one Relay, one Scheduled and one Child per group.
Each run must complete 18,000 root workflows and 1,200 children, 594,000 visits, 202,800 attempts, 180,000 endpoint deliveries, 360,000 accepted frames and 27,600 blocks. All sixteen final certified tips must reach 1,724; 1,024 sampled blocks are checked with each implementation's typed codec. Transport, workflow, callback and runnable state must drain; RSX additionally exposes its Store-debt predicate. Motoko has no equivalent exposed GC-debt predicate.
Instructions are the sum of all finished replicated Wasm entries from setup-excluded load through ordinary final publication/maintenance. They include wrappers, codecs, runtime/GC, timers and callbacks. Read-only query/inspection entries are preserved but excluded. The reported heap-page component is already included in total instructions: 80,000 per newly accessed 64 KiB region and another 80,000 per newly written region, independently for each execution on this pinned server. The residual is not pure CPU. These traces do not report aborted DTS attempts or scheduler-only round accounting.
Rates divide completed work by the entire simulated load/drain/tail duration; they are not wall-clock throughput or peak arrival-window rates. Workflow latency uses all 19,200 admissions through completion. Motoko's additional submission latency includes the IC ingress queue, while RSX's receipt latency starts after it; those additional root percentiles are not compared.
Admission correction
5d51dada preserves receipt time and relative delay in the queue, then constructs
workflow creation, wake and replay-expiry timestamps once at actual admission.
No started effect has its request identity or replay clock refreshed. Three
focused native tests cover delayed admission beyond the full replay window,
FIFO/reopen/receipt preservation, capacity/input rejection and timestamp
overflow. The corrected schema is a fresh prototype layout, with no migration
or legacy reader.
Removing the premature absolute timestamps also shrinks the saved request from 176 to 160 bytes: 409 records per 64 KiB PageLog allocation instead of 371. The 16,384 receipts now reserve 41 pages rather than 45. Comparisons with the previous RSX control include both the timing correction and this representation change. The Store, PageLog and shared SDK implementation are unchanged.
Fresh RSX build: 179.10s; actual benchmark: 155.71s host wall time, with all guarded inputs unchanged. Motoko build: 111.77s; actual benchmark: 74.66s host wall time. Host timings are separate from the simulated throughput above.
Scope and reproduction
This is an implementation comparison with matched successful work and measurement boundaries, not an isolated language test. Motoko still uses Candid for public methods and outer Reactor envelopes, with ICWire inside; RSX uses bounded Wire at both boundaries. The coordinated-start scheduling and other source differences are listed in workload-parity.md. Do not infer identical arbitrary-input behavior from matched successful counts.
The Motoko build/run report records the copied canonical builder,
compiler/plugins and host-only trace/publication adapter. The
RSX build packet pins the corrected source and canonical
timer artifact. The
independent IC audit reviews measurement and closure.
Raw results, compressed complete traces, exact source snapshots and receipts
are retained under motoko/ and rsx/. No guest profiling probes are inserted.
Run python3 research/experiments/2026-10-20-motoko-current/compare.py from the
repository to verify hashes, page accounting, settings and work, and regenerate
summary.json. This is one run per artifact, not a statistical confidence claim.
The shared viewer remains at http://127.0.0.1:8090/. Instance 19 contains the successful Motoko trace; instance 20 contains the corrected RSX run. Deleting an instance does not delete its archived viewer traces. The host-profile failure from the earlier Motoko attempt is preserved separately and contributes no comparison measurements.