REMOTE ARC BLOG

Why Remote Arc chose Go: measured against TypeScript on Mac and Windows

Go did not win every run. Remote Arc 0.6.0 uses a native Go Agent because of its long-running device-runtime model and low measured resident memory, not because Go is always faster than TypeScript.

A reproducible comparison, not a universal language contest

L1 runs local Core JSONL IPC; L2 runs a complete foreground Agent against an authenticated loopback WebSocket relay. Three alternating rounds on the same host yielded 600 observations per file operation. Values below are L2 P50 milliseconds, with post-batch RSS in MiB, rather than production Cloudflare or ChatGPT timings.

Mac: compare atomic and durable separately

At source f68ab09 on an Intel Mac, L2 atomic writes were 5.327 ms for TS and 2.713 ms for Go; memory was 100.69 MiB TS versus 16.35 MiB Go. In durable mode, write latency grew to 203.618 ms TS and 195.803 ms Go. Waiting for file and metadata synchronization dominates that difference. Mac fsync is not a full hardware power-loss guarantee.

Windows: the regression and its correction

At f68ab09 on an Intel Windows PC, Go writes were slower: 29.152 ms against TS 20.977 ms, and Undo took 51.719 ms against TS 16.091 ms. The native Windows path-handling implementation was corrected and measured again at 71cde96. In that follow-up, L2 atomic writes took 9.687 ms for Go versus 21.294 ms for TS; Undo took 12.942 ms versus 16.189 ms. Keeping both reports is important because these are distinct source revisions.

Two-hour isolated native Agent residency

In the older f68ab09 soak, the Mac completed 7,200 seconds with sampled native Go RSS growing from 14.11 to 17.33 MiB; Windows completed 7,200 seconds from 17.80 to 24.79 MiB, peak sampled 25.11 MiB. Tests covered Undo, file conflicts, managed processes and fixture reconnects. They are not a physical power-loss trial or production-service upgrade test.

What production benchmarking still needs

L3 remains a future measured comparison: AI client to Cloudflare Relay to device, broken down by routing, network and execution time. Hardware durability, real outages and installed-service upgrade behavior remain distinct release checks. TS remains a compatibility fallback; the hosted Worker and Dashboard still use TypeScript.