Cold vs. warm boot

bb bench changes the function's memory size, which makes the next invoke start in a fresh execution environment. It takes one cold sample there, then five warm samples back to back, and prints a table from CloudWatch's REPORT line. The parser in script/bench.clj is shared by every lambda-mvp-* sibling.

This project's numbers

Measured on 2026-11-14 in ap-southeast-2, arm64, provided.al2023, Glojure v0.7.24, built with Go 1.25.6. bb bench ran three times, and the table gives the median of those runs with the Cold Init range next to it.

Metric2048 MB3008 MB
Cold Init Duration (median of 3)102.1 ms103.0 ms
Cold Init Duration (range of 3)80-103 ms83-104 ms
Cold Duration (median of 3)3.6 ms3.8 ms
Warm Duration (median of the 3 medians)1.2 ms1.2 ms
Max Memory Used28 MB28 MB

The first invoke after the deploy was cold too, with 103.45 ms of Init and 3.84 ms of Duration. dist/bootstrap is 15,073,464 bytes and the zip 4,727,122.

Next to the siblings, same day

Three siblings were benched in the same account and region within about an hour of this run, with the same methodology:

At 2048 MBglj (Glojure)cljs (shadow-cljs)cljrfc (Clojurific)jlt (Jolt 0.8.27)
Cold Init Duration102.1 ms134.7 ms184.4 ms477.1 ms
Cold Duration3.6 ms4.9 ms3.4 ms2.2 ms
Warm Duration1.2 ms1.8 ms1.8 ms2.0 ms
Max Memory Used28 MB77 MB81 MB128 MB
Deployed zip4.7 MB23 KB77 KB15.3 MB
At 3008 MBglj (Glojure)cljs (shadow-cljs)cljrfc (Clojurific)jlt (Jolt 0.8.27)
Cold Init Duration103.0 ms135.3 ms149.5 ms349.3 ms
Cold Duration3.8 ms5.0 ms3.8 ms1.9 ms
Warm Duration1.2 ms1.9 ms1.6 ms1.7 ms
Max Memory Used28 MB77 MB82 MB128 MB

Every figure is a median of three bench runs. The siblings' own guides have the ranges. cljs and cljrfc run on AWS's managed nodejs24.x runtime, while jlt and this project are custom runtimes on provided.al2023, so the columns differ in deployment model as well as language.

Glojure had the lowest Cold Init and the least memory of the four, at both tiers. Its slowest cold sample (103.8 ms) still came in under shadow-cljs's slowest (135.4 ms), so the ranges don't overlap. The memory figure stayed at 28 MB on every sample, close to the 26 MB the jank sibling measured for its native binary in September. A static Go binary starts without a VM to boot or a runtime image to load, which fits these numbers, but nothing here separates Go's startup from Glojure's own namespace loading.

Jolt's handler was the fastest once it was running, at about 2 ms on a cold invoke against Glojure's 3.6 to 3.8 ms. Glojure's warm calls were the quickest, at 1.2 ms.

Reproducing a run

export AWS_PROFILE=... AWS_REGION=...
bb build
bb deploy
bb bench
bb teardown   # when you're done

BENCH_MEMORY_TIERS (default 2048,3008) and BENCH_WARM_SAMPLES (default 5) are overridable. bb bench leaves the function at its last tier, so tear it down afterwards. Your numbers will differ by account, region and day, and Cold Init moves the most: shadow-cljs's medians in this account were 20 to 30 ms higher today than in September, with identical code.