Sign in

Oliver Medhurst

@honk.foo
2.7K followers 587 following 302 posts

compiling javascript: porffor.dev + browser security

PostsRepliesMedia
Oliver Medhurst @honk.foo · 25/09/2026
this also introduces incremental compilation which can speedup builds by up to 30x versus last release!
warm compilation
react  17.45s → 0.56s (31x)
svelte  7.23s → 0.29s (25x)
preact  5.22s → 0.19s (27x)
solid   9.90s → 0.33s (30x)
0170
Oliver Medhurst @honk.foo · 25/09/2026
the latest version of Porffor features ESM support! it not only removes needing a bundler beforehand but also makes compilation much faster as we can split C across modules
compilation time, selfhosted
react  17.31s → 4.16s (4.2x)
svelte  7.30s → 2.21s (3.3x)
preact  5.17s → 1.63s (3.2x)
solid   9.95s → 2.80s (3.6x)
4574
Oliver Medhurst @honk.foo · 18/09/2026
for fun: TSC compiled to native with Porffor! 25MB, starts in <5ms
honk@gosling tsc % bat -p demo.ts
type Config = { port: number };
const cfg: Config = { port: "8080" };
honk@gosling tsc % tsc --noEmit demo.ts
demo.ts:2:23 - error TS2322: Type 'string' is not assignable to type 'number'.

2 const cfg: Config = { port: "8080" };
                        ~~~~

  demo.ts:1:17
    1 type Config = { port: number };
                      ~~~~
    The expected type comes from property 'port' which is declared here on type 'Config'


Found 1 error in demo.ts:2

honk@gosling tsc % du -h out/release/tsc
 25M    out/release/tsc
honk@gosling tsc % ./out/release/tsc --noEmit demo.ts
demo.ts:2:23 - error TS2322: Type 'string' is not assignable to type 'number'.

2 const cfg: Config = { port: "8080" };
                        ~~~~

  demo.ts:1:17
    1 type Config = { port: number };
                      ~~~~
    The expected type comes from property 'port' which is declared here on type 'Config'


Found 1 error in demo.ts:2
7946
Oliver Medhurst @honk.foo · 15/07/2026
now state of the art btw because why not :)
A table:

method	median error	mean error	words ≤300ms off ↓
autolrc + line anchors	32 ms	70 ms	97.2%
autolrc	34 ms	190 ms	95.8%
dafx (2025)	41 ms	216 ms	95.2%
kglw (2025)	—	200 ms	94%
gupta et al. (2020)	50 ms	220 ms	94%
huang et al. (2022)	—	230 ms	94%
hx-ih (2023)	43 ms	160 ms	93%
mstre-net (2021)	—	310 ms	93%
spotify (2023)	—	150 ms	92%
vaglio et al. (2020)	—	370 ms	92%
hx-d (2023)	43 ms	420 ms	89%
stoller et al. (2019)	—	820 ms	85%
0150
Oliver Medhurst @honk.foo · 08/07/2026
uses ~1mb memory btw ;)
"autolrc.honk.foo 1 - 1.14 MiB"
080
Oliver Medhurst @honk.foo · 08/07/2026
Porffor is now self-hosted, meaning it compiles itself with itself! This is made possible by Porffor's new rewrite, reducing its lines of code by >50% and making C output up to 5x more efficient! Here you can see the stats before and after the rewrite for Porffor itself:
Porffor selfhost rewrite graphs, before vs after.

bundle lines 40.4K→24.7K (1.6x smaller)
bundle size 2.4MB→2.0MB (1.2x smaller)

C lines 1.6M→289.0K (5.5x smaller)
C size 70.4MB→12.3MB (5.7x smaller)

debug compile time 5.0s→1.2s (4.1x faster)
release compile time 143.2s→37.1s (3.9x faster)

debug binary size 52.4MB→13.6MB (3.8x smaller)
release binary size 14.1MB→4.6MB (3.1x smaller).
48910
Oliver Medhurst @honk.foo · 08/07/2026
even smaller btw ;)
  bundle    24.57K lines (+0.00%)   2.04MB  (+0.01%)
  c         288.52K lines (+0.01%)  12.29MB (+0.02%)
  binary    4.56MB (+0.00%)
010
Oliver Medhurst @honk.foo · 07/07/2026
size unmaxxing
  selfhosted now vs 2.1h ago
  bundle    24.49K lines (-5.18%)    2.00MB  (-9.22%)
  c         387.65K lines (-24.33%)  15.09MB (-40.88%)
  binary    4.86MB (-48.60%)
1291
Oliver Medhurst @honk.foo · 27/06/2026
generators
> function* foo() { console.log('pre yield 1'); yield 1; console.log('pre yield 2'); yield 2; console.log('end'); }
> let x = foo()
> x.next()
pre yield 1
{
  value: 1,
  done: false
}
> x.next()
pre yield 2
{
  value: 2,
  done: false
}
> x.next()
end
{
  value: undefined,
  done: true
}
1222
Oliver Medhurst @honk.foo · 25/06/2026
oops (#vagueposting)
Description
compiling javascript: https://porffor.dev + occasional browser security
0130
Oliver Medhurst @honk.foo · 16/06/2026
but nan boxing wins for in-memory stuff! hence hybrid ;)

Scenario	Nanbox	Struct	Winner
Sequential write numbers	0.031199 s	0.061291 s	Nanbox, 1.96x faster
Sequential read numbers	0.125784 s	0.148851 s	Nanbox, 1.18x faster
Sequential read + write numbers	0.030615 s	0.061146 s	Nanbox, 2.00x faster
Sequential write mixed values	0.073787 s	0.108784 s	Nanbox, 1.47x faster
Sequential read mixed values	0.151721 s	0.156975 s	Nanbox, 1.03x faster
Type scan mixed values	0.039022 s	0.057213 s	Nanbox, 1.47x faster
Copy array	0.045452 s	0.093518 s	Nanbox, 2.06x faster
Random read numbers	0.774604 s	0.908102 s	Nanbox, 1.17x faster
Random read mixed values	0.934132 s	1.299783 s	Nanbox, 1.39x faster
Random read + write numbers	0.811805 s	0.914708 s	Nanbox, 1.13x faster
020
Oliver Medhurst @honk.foo · 16/06/2026
Short name	Mean time	Delta
NaN box	779.8 ms	1.00x
struct	126.0 ms	6.19x faster
130
Oliver Medhurst @honk.foo · 11/06/2026
Speedup column with values: 2.2×, 1.4×, 2.6×, 1.6×, 2.8×, 3.2×, 3.0×, 2.2×, 3.2×, 1.1×, 1.4×
010
Oliver Medhurst @honk.foo · 11/06/2026
Map and Set are now up to over 300x faster :)
scenario (n=20k)	old wasm	new wasm	Δ	old native	new native	Δ
insert string keys	933ms	8ms	117×	442ms	4ms	111×
lookup string keys	9153ms*	29ms	316×	3141ms*	22ms	143×
int keys	3532ms*	41ms	86×	1412ms*	26ms	54×
object keys	3524ms*	17ms	207×	1445ms*	10ms	145×
set dedup	476ms*	6ms	79×	244ms*	3ms	81×
delete/add churn	4051ms*	11ms	368×	2030ms*	8ms	254×
2280
Oliver Medhurst @honk.foo · 10/06/2026
(very!) early preview for a new experimental threading Porffor api. it enables intentionally low level concurrency to (try to) enable the most efficient communication feasible. here are 1 million threads alive simultaneously using only ~16gb. 16kb/thread, <1us start avg.
A graph with RSS as Y axis and threads as X axis. It increases linearly bottom left to top right. Footer shows: "1.00M threads · 15.9 GB · 16 KB/thread · 0.7 µs/start"
0432
Oliver Medhurst @honk.foo · 10/06/2026
cleanup grind continues
[5.48s] compiled selfhosted/porf
  bundle    37.44K lines (-0.10%)  2.17MB  (-0.08%)
  c         1.639M lines (-0.16%)  72.84MB (-0.16%)
  binary    53.75MB (-0.11%)
080
Oliver Medhurst @honk.foo · 09/06/2026
optimized selfhosted porffor binary is now <20mb and only takes ~1 minute to compile (>90% clang). (% change is vs debug binary) still buggy though. also still too big ;)
honk@gosling porffor % ./selfhost compile --release
[384ms] bun selfhosted/build.mjs
[4.43s] ./porf c --gc -d --profile-compiler selfhosted/bundle.js selfhosted/stage1.c
[58.08s] make -j8 -f selfhosted/stage1.split/Makefile

[63.08s] compiled selfhosted/porf
  bundle    37.48K lines (+0.00%)  2.18MB  (+0.00%)
  c         1.644M lines (+0.00%)  73.03MB (+0.00%)
  binary    19.82MB (-63.20%)
1210
Oliver Medhurst @honk.foo · 09/06/2026
self compilation is now ~15% faster after some optimizations for 2c itself, and emits a smaller (unoptimized debug!) binary
[5.39s] compiled selfhosted/porf
  bundle    37.51K lines (+0.15%)  2.18MB  (+0.09%)
  c         1.644M lines (-0.58%)  73.04MB (-0.47%)
  binary    53.86MB (-0.70%)
0180
Oliver Medhurst @honk.foo · 09/06/2026
after more 2c optimizations
[6.18s] compiled selfhosted/porf
  bundle    37.46K lines (+0.04%)   2.18MB  (-0.02%)
  c         1.653M lines (-17.40%)  73.38MB (-17.76%)
  binary    54.24MB (-12.32%)
090
Oliver Medhurst @honk.foo · 09/06/2026
more (vs same snapshot)
[6.67s] compiled selfhosted/porf
  bundle    37.31K lines (+0.07%)  2.18MB  (+0.08%)
  c         2.024M lines (-8.16%)  90.01MB (-5.90%)
  binary    62.27MB (-7.90%)
050
Oliver Medhurst @honk.foo · 09/06/2026
-> c optimizations
[6.74s] compiled selfhosted/porf
  bundle    37.31K lines (+0.08%)  2.17MB  (+0.07%)
  c         2.094M lines (-5.00%)  92.96MB (-2.82%)
  binary    63.61MB (-5.91%)
150
Oliver Medhurst @honk.foo · 09/06/2026
cleaning up code directly correlates to smaller (unoptimized!) selfhosted binary size 😇 (the ~release binary size is much much smaller)
A terminal screenshot:


[7.07s] compiled selfhosted/porf
  bundle    37.42K lines (-0.21K)  2.18MB  (-3.2KB)
  c         2.204M lines (-6.06K)  95.66MB (-0.26MB)
  binary    67.61MB (-0.2MB)
1140
Oliver Medhurst @honk.foo · 08/06/2026
elysia uses >2x less memory with ~15% lower latency and higher throughput vs ~a week ago :)
./elysia_new
  Latency             #1    median 0.377 ms, p90 0.525 ms, p99 0.909 ms
  Throughput (req/s)  #1    overall 118411.4, p10 110169.6, p1 69386.1

  Memory usage        #1    peak 7.80 MB, median 6.91 MB
  CPU time / req      #1    median 8.26 µs, p90 8.51 µs, p99 8.61 µs
  Binary size         #2    6.07 MB
  Startup             #1    7.630 ms


./elysia_old
  Latency             #2    median 0.443 ms, p90 0.528 ms, p99 0.942 ms
  Throughput (req/s)  #2    overall 104255.5, p10 95517.0, p1 67389.8

  Memory usage        #2    peak 16.50 MB, median 16.48 MB
  CPU time / req      #2    median 9.46 µs, p90 9.60 µs, p99 9.62 µs
  Binary size         #1    5.80 MB
  Startup             #2    21.27 ms
1390
Oliver Medhurst @honk.foo · 07/06/2026
fun data from optimizing how builtin apis are embedded (they are precompiled). numbers are still unoptimized/not final! oh and btw porffor can selfhost now ;)
a markdown table:

precompiled.js size
json (before): 3.05MB
huffman: 1.30MB
change: -57.2%
array interning: 1.17MB
change: -10.5%
final diff: -61.7%

selfhost bundle size
json (before): 4.15MB
huffman: 2.40MB
change: -42.0%
array interning: 2.29MB
change: -4.9%
final diff: -44.8%

selfhost binary size
json (before): 34.28MB
huffman: 33.22MB
change: -3.1%
array interning: 28.12MB
change: -15.4%
final diff: -18.0%

selfhost compiling globalThis time
json (before): 725.5ms
huffman: 601.5ms
change: -17.1%
array interning: 574.3ms
change: -4.5%
final diff: -20.8%

selfhost compiling globalThis rss
json (before): 233.7MB
huffman: 144.1MB
change: -38.3%
array interning: 141.4MB
change: -1.9%
final diff: -39.5%
1240
Oliver Medhurst @honk.foo · 05/06/2026
hono uses ~10% less memory with ~5% lower latency vs a few days ago, thanks to new gc and other allocation optimizations
./hono_new
  Latency             #1    median 0.417 ms, p90 0.451 ms, p99 0.867 ms
  App                 #1    median 0.003 ms, p90 0.003 ms, p99 0.004 ms
  Throughput (req/s)  #1    overall 115719.0, p10 109517.8, p1 82189.2
  Memory usage        #1    peak 3.58 MB, median 3.56 MB
  CPU time / req      #1    median 8.58 µs, p90 8.61 µs, p99 8.62 µs
  Binary size         #2    731.1 KB
  Startup             #1    7.322 ms

./hono_old
  Latency             #2    median 0.433 ms, p90 0.471 ms, p99 0.898 ms
  App                 #1    median 0.003 ms, p90 0.003 ms, p99 0.004 ms
  Throughput (req/s)  #2    overall 111291.0, p10 105300.5, p1 75054.0
  Memory usage        #2    peak 3.91 MB, median 3.89 MB
  CPU time / req      #2    median 8.90 µs, p90 9.11 µs, p99 9.23 µs
  Binary size         #1    650.4 KB
  Startup             #2    7.486 ms
0551
Oliver Medhurst @honk.foo · 05/06/2026
Porffor's optimization phase is now 5-10x faster for large files

selfhost                 old         new            diff
----------------  ----------  ----------  --------------
  parse                   70          70            same
  codegen               1591        1576    1.01x faster
  opt                   4219         612    6.90x faster
  assemble               269         269    1.00x slower
  2c                    2116        1626    1.30x faster
  total                 8449        4330    1.95x faster
2290
Oliver Medhurst @honk.foo · 04/06/2026
forgot I added some debug logs um
A terminal screenshot with "compareStrings ToString b type=7" repeated.. a lot
1140
Oliver Medhurst @honk.foo · 04/06/2026
if you want a more traditional/detailed profiler I got you too ;)
A large detailed flamegraph
0180
Oliver Medhurst @honk.foo · 04/06/2026
new experiment
A terminal screenshot showing:

hot: 5 lines in scheduler_schedule account for 27% of runtime
   --> bench/richards.js:180
     |
 178 | Scheduler.prototype.schedule = function scheduler_schedule() {
 179 |   this.currentTcb = this.list;
 180 |   while (this.currentTcb != null) {
     |          ^^^^^^^^^^^^^^^ 3% of runtime
 181 |     if (this.currentTcb.isHeldOrSuspended()) {
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 10% of runtime
 182 |       this.currentTcb = this.currentTcb.link;
     |                         ^^^^^^^^^^^^^^^^^^^^ 3% of runtime
 183 |     } else {
 184 |       this.currentId = this.currentTcb.id;
     |                        ^^^^^^^^^^^^^^^^^^ 4% of runtime
 185 |       this.currentTcb = this.currentTcb.run();
     |                         ^^^^^^^^^^^^^^^^^^^^^ 6% of runtime
 186 |     }
 187 |   }
     |
     = note: object lookup accounts for 81% of these lines' time
2323
Oliver Medhurst @honk.foo · 30/05/2026
#grafanaposting
A latency graph over time with legend to the right: "p50 924us, p90 1.56ms, p99 1.97ms"
1100
Oliver Medhurst @honk.foo · 29/05/2026
hmm
Screenshot of a terminal:

honk@gosling porffor % bat hello.js
console.log('hello world!')
honk@gosling porffor % node runtime/index.js native hello.js foo
[138ms] compiled hello.js -> foo (33.5KB)
honk@gosling porffor % mv foo porf_on_node
honk@gosling porffor % /tmp/selfhost native hello.js foo > /dev/null
honk@gosling porffor % mv foo porf_on_porf
honk@gosling porffor % sha256sum porf_on*
50f96a9114b76d3e556a3e1ab73d32d05cca499801b86d61efcf283c5bbcaaee  porf_on_node
50f96a9114b76d3e556a3e1ab73d32d05cca499801b86d61efcf283c5bbcaaee  porf_on_porf
4230
Oliver Medhurst @honk.foo · 15/05/2026
agentic(tm) mode
A tooltip for the sparkle button says "Agentic(tm) mode" but "Agentic" is in comic sans
130
Oliver Medhurst @honk.foo · 15/05/2026
i guess everyone is making code review tooling now. idk if I'll release this yet
A screenshot of a code review app. It shows a diff center stage with a file sidebar and a header saying unstaged changes with a line diff viewable. There is also a refresh button and a sparkles button.
3190
Oliver Medhurst @honk.foo · 14/05/2026
rewrote 2c and now it emits ~2x less lines of c :)
"Non-empty lines 226,814""Non-empty lines 135,157"
170
Oliver Medhurst @honk.foo · 14/05/2026
learning to get less attached to old code. you can just delete things
"7 files changed +0 -1069"
2760
Oliver Medhurst @honk.foo · 08/05/2026
enjoy 2 new blog posts! - Porffor now has closures: surprisingly annoying for a compiler. goose.icu/porffor-clos... - Profile-guided dead code elimination: a novel approach for DCE in dynamic languages. goose.icu/profile-guid...
A screenshot of https://goose.icu/porffor-closures/A screenshot of https://goose.icu/profile-guided-dce/
2506
Oliver Medhurst @honk.foo · 08/05/2026
new tech (ignore the last one)
% du -h hello hello_trimmed
168K    hello
120K    hello_trimmed
% du -h hono hono_trimmed
668K    hono
296K    hono_trimmed
% du -h elysia elysia_trimmed
5.9M    elysia
1.3M    elysia_trimmed
250
Oliver Medhurst @honk.foo · 08/05/2026
oops
rest:   94.632 ms -> 0.196 ms   99.79% less time, 482.7x faster
spread: 99.442 ms -> 2.277 ms   97.71% less time, 43.7x faster
1110
Oliver Medhurst @honk.foo · 06/05/2026
updating all from ~1 week old version to latest ~halved memory usage!
A graph of memory usage for different containers over time, it starts at ~7mb, with a few drops in between the end, just under 4mb.A screenshot of Porffor process RSS usage over time for different containers, it starts at ~20mb then has some big drops in the middle with the end resulting in just under 8mb!
0120
Oliver Medhurst @honk.foo · 06/05/2026
nevermind, porffor.dev containers use ~600kb of memory now 🤯
A screenshot of a graph showing the memory usage of 2 replicas of porffor.dev over a short time period, it is flat. porffor-dev 1 is using 590 KiB and porffor-dev 2 is using 620 KiB
61015
Oliver Medhurst @honk.foo · 06/05/2026
deployed latest porffor to porffor.dev (previously running a ~week old version). the improvements are obvious 😍
A graph showing memory usage of porffor.dev containers. Half way through, it drops dramatically with a dashed line.A graph shows details of different memory statistics for porffor.dev - all the stats drop dramatically after a dashed line.
1280
Oliver Medhurst @honk.foo · 06/05/2026
I also got (static) musl working and uh, wow that memory usage
./hello
  Latency             #1    median 0.120 ms, p90 0.137 ms, p99 0.239 ms
                                               █▇▁
                                              ▂███▅▂▁
  Throughput (req/s)  #1    overall 390315.5, p10 358635.7, p1 270529.2
                                                                 ▁  █
                                                            ▁▁▂▄▆█▇▇█▅

  Memory usage        #2    peak 4.14 MB, median 4.14 MB
                                                                      █
                                                                     ▂█
  CPU time / req      #1    median 1.67 µs, p90 1.68 µs, p99 1.70 µs
                                            █
                            ▄      ▄  █  ▄  █   ▄
  Binary size         #1    178.7 KB
  Startup             #2    5.335 ms


./hello_musl
  Latency             #2    median 0.127 ms, p90 0.141 ms, p99 0.247 ms
                                                ▃█
                                               ▁███▆▂▁
  Throughput (req/s)  #2    overall 376197.9, p10 353609.2, p1 267334.6
                                                               ▁  █
                                                             ▂▅█▅▇█▁

  Memory usage        #1    peak 740.0 KB, median 736.0 KB
                            █
                            █
  CPU time / req      #2    median 1.79 µs, p90 1.82 µs, p99 1.84 µs
                                                         ▃      █
                                                   ▅  ▅  █   ▅  █  ▅
  Binary size         #2    772.5 KB
  Startup             #1    4.897 ms
290
Oliver Medhurst @honk.foo · 06/05/2026
now 5% less memory usage, faster and <180kb binary size :)
Screenshot of terminal with the output of a benchmark script:

./hello_rewritealloc
  Latency             #1    median 0.127 ms, p90 0.142 ms, p99 0.254 ms
                                              ▁▂█▅
                                             ▁████▇▃▁
  Throughput (req/s)  #1    overall 378130.0, p10 346460.5, p1 238971.8
                                                             ▄▁█
                                                          ▂▃▆████▂█▆

  Memory usage        #1    peak 4.14 MB, median 4.13 MB
                                    █
                            ▄   ▄▄▄▄█▄
  CPU time / req      #1    median 1.75 µs, p90 1.82 µs, p99 1.84 µs
                                                 █
                            █ █             █    █ █  █ █ █  █
  Binary size         #1    178.7 KB
  Startup             #1    5.264 ms


./hello_rewriteobjectaccess
  Latency             #2    median 0.132 ms, p90 0.142 ms, p99 0.258 ms
                                                ▂█▄
                                              ▁████▅▁
  Throughput (req/s)  #2    overall 369900.7, p10 347703.7, p1 313816.8
                                                             █▂
                                                          ▁▃▇██▃▆▇

  Memory usage        #2    peak 4.35 MB, median 4.34 MB
                                                                     █
                                                             ▃ ▃▃▃   █▃
  CPU time / req      #2    median 1.83 µs, p90 1.90 µs, p99 1.92 µs
                                          ▃               ▃  █
                                          █      ▅        █  █      ▅
  Binary size         #2    194.7 KB
  Startup             #2    5.653 ms
2370
Oliver Medhurst @honk.foo · 05/05/2026
plus its very slightly faster and uses 0.5% less memory (every little helps)
A screenshot of a terminal benchmark:

./hello_rewriteobjectaccess
  Latency             #1    median 0.132 ms, p90 0.144 ms, p99 0.262 ms
                                               ▆█▂
                                             ▁▆███▄▁▁
  Throughput (req/s)  #1    overall 365908.2, p10 339958.4, p1 262535.5
                                                              ▄█  ▁
                                                        ▁▂▁▁▂▄███▇█▁

  Memory usage        #1    peak 4.35 MB, median 4.35 MB
                                                          █
                            ▅                  ▆          █
  CPU time / req      #1    median 1.84 µs, p90 1.90 µs, p99 1.94 µs
                                                   █
                            █   █                  █
  Binary size         #1    194.7 KB
  Startup             #1    12.63 ms


./hello
  Latency             #2    median 0.134 ms, p90 0.148 ms, p99 0.270 ms
                                               ▃█▇
                                             ▁▆███▆▃▁
  Throughput (req/s)  #2    overall 361300.4, p10 333547.7, p1 268384.8
                                                              █▁
                                                        ▁▁▁▂▅▇██▆▅▅▁▁

  Memory usage        #2    peak 4.37 MB, median 4.36 MB
                                                                    █
                                     ▆                              █ ▅
  CPU time / req      #2    median 1.86 µs, p90 1.93 µs, p99 1.94 µs
                            █              █           █          █
                            █              █           █          █
  Binary size         #2    210.7 KB
  Startup             #2    12.83 ms
1101
Oliver Medhurst @honk.foo · 05/05/2026
hello world http server is now under 200kb 🥳
A screenshot of a terminal:

212K hello
196K hello_rewriteobjectaccess
3410
Oliver Medhurst @honk.foo · 05/05/2026
there are replicas hence the duplicates and numbers
A stacked graph of memory usage for containers. The legend table reads: "blog 1: 2.45 MiB, blog 2: 2.46 MiB, porffor-dev 1: 1.11 MiB, porffor-dev 2: 1.13 MiB"
1110
Oliver Medhurst @honk.foo · 04/05/2026
one week of uptime 🥹
A screenshot of porffor.dev showing "This page is served by a Porffor-compiled TS binary! ... uptime 1w 11h"
2561
Oliver Medhurst @honk.foo · 02/05/2026
some more fun graphs from load testing today
A Grafana dashboard showing several spikes and loads over a 1 hour window. There is req/s, egress, response time, CPU and memory usage visible. There are no errors :)
1190
Oliver Medhurst @honk.foo · 30/04/2026
as soon as I posted this made I another major optimization to it lol
A screenshot of a terminal with neat looking stats and histograms comparing the http servers.

./[redacted]_gcopts
  Latency             #1    median 0.560 ms, p90 0.875 ms, p99 8.976 ms
                              █▂
                              ██▂▁
  App                 #1    median 0.003 ms, p90 0.003 ms, p99 0.006 ms
                              █ ▃
                              █ █ ▁      ▁ ▁
  Throughput (req/s)  #1    overall 65123.7, p10 7708.9, p1 67.2
                                                     ▂▄▆█▅
                            ▇▃▂▃▃▃▂       ▂▃▃▃▂▁▂▂▃▅▇█████

  Memory usage        #1    peak 5.98 MB, median 5.92 MB
                            █  █             ▆                  ▇     ▇
                            █  █             █                  █     █
  CPU time / req      #1    median 10.4 µs, p90 10.6 µs, p99 10.6 µs
                            █       █ █  █ █
                            █       █ █  █ █
  Binary size         #1    938.7 KB
  Startup             #1    13.52 ms


./[redacted]
  Latency             #2    median 0.606 ms, p90 0.966 ms, p99 9.212 ms
                               █
                              ▁█▁▁
  App                 #2    median 0.004 ms, p90 0.006 ms, p99 0.008 ms
                                      ▂█
                                      ██ ▃           ▁ ▁
  Throughput (req/s)  #2    overall 60130.5, p10 6901.9, p1 67.7
                                                     ▄█
                            ▅▁▁▂▂▂▁      ▁▂▂▁▁▁▁▁▃▅▆▆██

  Memory usage        #1    peak 5.98 MB, median 5.95 MB
                                          █        ▇    ▆           ▇ ▇
                                          █        █    █           █ █
  CPU time / req      #2    median 11.1 µs, p90 11.9 µs, p99 12.1 µs
                                                   █
                                                   ██     █
  Binary size         #1    938.7 KB
  Startup             #2    14.40 ms
050
Oliver Medhurst @honk.foo · 30/04/2026
fun comparison of an old build of something ;) vs now. >10x faster :)
A screenshot of a terminal with neat looking stats and histograms comparing the http servers. The top binary is >10x faster!

./[redacted]
  Latency             #1    median 0.608 ms, p90 1.001 ms, p99 9.315 ms
                             ▁█
                             ██▃
  App                 #1    median 0.004 ms, p90 0.006 ms, p99 0.008 ms
                                ▁ █
                                █ █ ▃           ▁ ▁
  Throughput (req/s)  #1    overall 59533.7, p10 6504.1, p1 67.5
                                                            ▂▃█▆
                            █▁▂▂▂▂▂▁▁        ▁▂▃▃▃▁▁▁▁▁▃▃▄▆█████

  Memory usage        #1    peak 5.96 MB, median 5.88 MB
                            █
                            █
  CPU time / req      #1    median 11.5 µs, p90 11.6 µs, p99 11.6 µs
                            █
                            █
  Binary size         #1    938.7 KB
  Startup             #1    20.53 ms


./[redacted]_21_324
  Latency             #2    median 7.541 ms, p90 11.17 ms, p99 15.06 ms
                                                 █
                                                ▃█▁ ▁▃     ▂▁
  App                 #1    median 0.004 ms, p90 0.006 ms, p99 0.009 ms
                                █
                              ▂ █ ▁           ▁ ▂
  Throughput (req/s)  #2    overall 5927.1, p10 4359.3, p1 3670.8
                              ▁█
                             ▁██

  Memory usage        #2    peak 17.13 MB, median 17.13 MB
                                                                      █
                                                                      █
  CPU time / req      #2    median 165 µs, p90 165 µs, p99 165 µs
                                                                      █
                                                                      █
  Binary size         #2    1.76 MB
  Startup             #2    48.14 ms
140