From aa87f90b8abee66d2f8b2d4bcf6685edf501942e Mon Sep 17 00:00:00 2001 From: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com> Date: Tue, 25 Aug 2026 14:28:46 +0200 Subject: [PATCH 1/2] Bun: Do not use dynamic function for pipeline handler --- frameworks/bun/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/bun/server.ts b/frameworks/bun/server.ts index 26bff1a52..17c64270b 100644 --- a/frameworks/bun/server.ts +++ b/frameworks/bun/server.ts @@ -328,7 +328,7 @@ const qs = (req: Request): string => { // endpoints rather than branching on req.url. `fetch` below is only what is left when nothing // matched. const routes = { - "/pipeline": () => new Response("ok", { headers: TEXT }), + "/pipeline": new Response("ok", { headers: TEXT }), "/baseline11": { GET: (req: Request) => new Response(String(sumQuery(qs(req))), { headers: TEXT }), From 3f2cc1e8dc9b863a3da43f767e5f4765d0f296eb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Aug 2026 13:30:17 +0000 Subject: [PATCH 2/2] Benchmark results: bun [skip ci] --- site/data/results/bun.json | 362 ++++++++++++++++++------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/site/data/results/bun.json b/site/data/results/bun.json index ba94f15d0..ecbd40657 100644 --- a/site/data/results/bun.json +++ b/site/data/results/bun.json @@ -4,71 +4,71 @@ "api-16-1024": { "framework": "bun", "language": "TS", - "rps": 152696, - "avg_latency": "4.71ms", - "p99_latency": "31.00ms", - "cpu": "1494.5%", - "memory": "595MiB", + "rps": 154247, + "avg_latency": "4.77ms", + "p99_latency": "30.60ms", + "cpu": "1513.3%", + "memory": "592MiB", "connections": 1024, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "769.45MB/s", - "input_bw": "8.59MB/s", - "reconnects": 457865, - "status_2xx": 2290441, + "bandwidth": "777.34MB/s", + "input_bw": "8.68MB/s", + "reconnects": 462655, + "status_2xx": 2313712, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0, - "tpl_baseline": 858999, - "tpl_json": 858875, + "tpl_baseline": 867586, + "tpl_json": 867837, "tpl_db": 0, "tpl_upload": 0, "tpl_static": 0, - "tpl_async_db": 572566 + "tpl_async_db": 578286 }, "api-4-256": { "framework": "bun", "language": "TS", - "rps": 43637, - "avg_latency": "4.22ms", - "p99_latency": "24.40ms", - "cpu": "393.3%", - "memory": "156MiB", + "rps": 43441, + "avg_latency": "4.46ms", + "p99_latency": "25.10ms", + "cpu": "389.3%", + "memory": "157MiB", "connections": 256, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "219.93MB/s", - "input_bw": "2.46MB/s", - "reconnects": 130929, - "status_2xx": 654564, + "bandwidth": "218.92MB/s", + "input_bw": "2.44MB/s", + "reconnects": 130297, + "status_2xx": 651624, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0, - "tpl_baseline": 245393, - "tpl_json": 245346, + "tpl_baseline": 244329, + "tpl_json": 244302, "tpl_db": 0, "tpl_upload": 0, "tpl_static": 0, - "tpl_async_db": 163824 + "tpl_async_db": 162992 }, "async-db-1024": { "framework": "bun", "language": "TS", - "rps": 277270, - "avg_latency": "3.11ms", - "p99_latency": "16.70ms", - "cpu": "5156.2%", + "rps": 281632, + "avg_latency": "3.00ms", + "p99_latency": "15.90ms", + "cpu": "5251.6%", "memory": "2.2GiB", "connections": 1024, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "1.04GB/s", - "input_bw": "18.51MB/s", - "reconnects": 110639, - "status_2xx": 2772709, + "bandwidth": "1.05GB/s", + "input_bw": "18.80MB/s", + "reconnects": 112426, + "status_2xx": 2816329, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -76,19 +76,19 @@ "baseline-4096": { "framework": "bun", "language": "TS", - "rps": 1933399, - "avg_latency": "2.12ms", - "p99_latency": "3.82ms", - "cpu": "6739.6%", + "rps": 1918558, + "avg_latency": "2.13ms", + "p99_latency": "4.10ms", + "cpu": "6565.5%", "memory": "1.2GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "213.83MB/s", - "input_bw": "149.35MB/s", + "bandwidth": "212.19MB/s", + "input_bw": "148.20MB/s", "reconnects": 0, - "status_2xx": 9666996, + "status_2xx": 9592792, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -96,19 +96,19 @@ "baseline-512": { "framework": "bun", "language": "TS", - "rps": 1806113, - "avg_latency": "282us", - "p99_latency": "817us", - "cpu": "6742.0%", + "rps": 1784077, + "avg_latency": "286us", + "p99_latency": "806us", + "cpu": "6736.9%", "memory": "1.3GiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "199.75MB/s", - "input_bw": "139.52MB/s", + "bandwidth": "197.32MB/s", + "input_bw": "137.82MB/s", "reconnects": 0, - "status_2xx": 9030565, + "status_2xx": 8920386, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -116,19 +116,19 @@ "crud-4096": { "framework": "bun", "language": "TS", - "rps": 312418, - "avg_latency": "13.00ms", - "p99_latency": "24.00ms", - "cpu": "2841.3%", + "rps": 310978, + "avg_latency": "13.09ms", + "p99_latency": "25.00ms", + "cpu": "2928.7%", "memory": "1.5GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "104.65MB/s", - "input_bw": "26.82MB/s", - "reconnects": 22662, - "status_2xx": 4686279, + "bandwidth": "104.52MB/s", + "input_bw": "26.69MB/s", + "reconnects": 22504, + "status_2xx": 4664682, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -136,18 +136,18 @@ "fortunes-1024": { "framework": "bun", "language": "TS", - "rps": 83251, - "avg_latency": "8.81ms", - "p99_latency": "22.00ms", - "cpu": "6392.8%", + "rps": 82955, + "avg_latency": "8.94ms", + "p99_latency": "20.90ms", + "cpu": "6387.5%", "memory": "2.0GiB", "connections": 1024, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "1.92GB/s", + "bandwidth": "1.91GB/s", "reconnects": 0, - "status_2xx": 416257, + "status_2xx": 414777, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -155,19 +155,19 @@ "json-4096": { "framework": "bun", "language": "TS", - "rps": 1119942, + "rps": 1122348, "avg_latency": "3.29ms", "p99_latency": "10.40ms", - "cpu": "6511.8%", + "cpu": "6333.5%", "memory": "1.1GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "3.80GB/s", - "input_bw": "53.40MB/s", - "reconnects": 222856, - "status_2xx": 5599713, + "bandwidth": "3.81GB/s", + "input_bw": "53.52MB/s", + "reconnects": 223004, + "status_2xx": 5611743, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -175,19 +175,19 @@ "json-comp-16384": { "framework": "bun", "language": "TS", - "rps": 466635, - "avg_latency": "34.85ms", - "p99_latency": "60.50ms", - "cpu": "6527.8%", + "rps": 466079, + "avg_latency": "34.76ms", + "p99_latency": "59.20ms", + "cpu": "6522.1%", "memory": "1.2GiB", "connections": 16384, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "623.88MB/s", - "input_bw": "34.71MB/s", - "reconnects": 84983, - "status_2xx": 2333177, + "bandwidth": "623.15MB/s", + "input_bw": "34.67MB/s", + "reconnects": 84554, + "status_2xx": 2330399, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -195,19 +195,19 @@ "json-comp-4096": { "framework": "bun", "language": "TS", - "rps": 463429, - "avg_latency": "8.82ms", - "p99_latency": "21.10ms", - "cpu": "6467.9%", + "rps": 464909, + "avg_latency": "8.79ms", + "p99_latency": "20.30ms", + "cpu": "6498.5%", "memory": "1.1GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "619.61MB/s", - "input_bw": "34.47MB/s", - "reconnects": 91064, - "status_2xx": 2317146, + "bandwidth": "621.59MB/s", + "input_bw": "34.58MB/s", + "reconnects": 91311, + "status_2xx": 2324547, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -215,19 +215,19 @@ "json-comp-512": { "framework": "bun", "language": "TS", - "rps": 430945, - "avg_latency": "1.18ms", - "p99_latency": "5.05ms", - "cpu": "6064.4%", + "rps": 428765, + "avg_latency": "1.19ms", + "p99_latency": "5.25ms", + "cpu": "6095.5%", "memory": "1.1GiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "576.12MB/s", - "input_bw": "32.06MB/s", - "reconnects": 86212, - "status_2xx": 2154726, + "bandwidth": "573.27MB/s", + "input_bw": "31.89MB/s", + "reconnects": 85756, + "status_2xx": 2143825, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -235,18 +235,18 @@ "json-tls-4096": { "framework": "bun", "language": "TS", - "rps": 1076199, - "avg_latency": "3.84ms", - "p99_latency": "85.07ms", - "cpu": "6320.6%", + "rps": 1077848, + "avg_latency": "3.83ms", + "p99_latency": "57.45ms", + "cpu": "6316.8%", "memory": "1.0GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "3.65GB", + "bandwidth": "3.66GB", "reconnects": 0, - "status_2xx": 5482533, + "status_2xx": 5497505, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -254,19 +254,19 @@ "limited-conn-4096": { "framework": "bun", "language": "TS", - "rps": 1649543, + "rps": 1646424, "avg_latency": "2.47ms", - "p99_latency": "8.89ms", - "cpu": "6410.1%", - "memory": "1.2GiB", + "p99_latency": "8.78ms", + "cpu": "6578.1%", + "memory": "1.3GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "182.43MB/s", - "input_bw": "127.42MB/s", - "reconnects": 825121, - "status_2xx": 8247715, + "bandwidth": "182.09MB/s", + "input_bw": "127.18MB/s", + "reconnects": 823824, + "status_2xx": 8232124, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -274,19 +274,19 @@ "limited-conn-512": { "framework": "bun", "language": "TS", - "rps": 1394461, + "rps": 1394349, "avg_latency": "357us", - "p99_latency": "1.76ms", - "cpu": "6215.0%", + "p99_latency": "1.68ms", + "cpu": "6315.6%", "memory": "1.1GiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "154.22MB/s", - "input_bw": "107.72MB/s", - "reconnects": 697253, - "status_2xx": 6972305, + "bandwidth": "154.21MB/s", + "input_bw": "107.71MB/s", + "reconnects": 697161, + "status_2xx": 6971749, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -294,18 +294,18 @@ "pipelined-4096": { "framework": "bun", "language": "TS", - "rps": 346547, - "avg_latency": "145.50ms", - "p99_latency": "227.90ms", - "cpu": "6593.0%", - "memory": "863MiB", + "rps": 5417945, + "avg_latency": "12.09ms", + "p99_latency": "16.30ms", + "cpu": "6619.1%", + "memory": "449MiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "38.96MB/s", - "reconnects": 62, - "status_2xx": 1732737, + "bandwidth": "733.50MB/s", + "reconnects": 0, + "status_2xx": 27089728, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -313,18 +313,18 @@ "pipelined-512": { "framework": "bun", "language": "TS", - "rps": 90898, - "avg_latency": "14.48ms", - "p99_latency": "46.30ms", - "cpu": "1867.8%", - "memory": "550MiB", + "rps": 5000374, + "avg_latency": "1.64ms", + "p99_latency": "3.17ms", + "cpu": "6523.7%", + "memory": "420MiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "10.23MB/s", - "reconnects": 22, - "status_2xx": 454491, + "bandwidth": "676.97MB/s", + "reconnects": 0, + "status_2xx": 25001873, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -332,18 +332,18 @@ "static-1024": { "framework": "bun", "language": "TS", - "rps": 573475, - "avg_latency": "1.92ms", - "p99_latency": "35.20ms", - "cpu": "6592.1%", + "rps": 574323, + "avg_latency": "1.99ms", + "p99_latency": "41.81ms", + "cpu": "6531.0%", "memory": "1.1GiB", "connections": 1024, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "8.75GB", + "bandwidth": "8.77GB", "reconnects": 0, - "status_2xx": 2924437, + "status_2xx": 2928781, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -351,18 +351,18 @@ "static-4096": { "framework": "bun", "language": "TS", - "rps": 570062, - "avg_latency": "7.33ms", - "p99_latency": "60.17ms", - "cpu": "6581.8%", + "rps": 568905, + "avg_latency": "7.37ms", + "p99_latency": "93.26ms", + "cpu": "6548.0%", "memory": "1.1GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "8.70GB", + "bandwidth": "8.69GB", "reconnects": 0, - "status_2xx": 2907337, + "status_2xx": 2901755, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -370,18 +370,18 @@ "static-6800": { "framework": "bun", "language": "TS", - "rps": 560918, - "avg_latency": "12.22ms", - "p99_latency": "86.78ms", - "cpu": "6565.4%", + "rps": 559625, + "avg_latency": "12.25ms", + "p99_latency": "73.93ms", + "cpu": "6566.0%", "memory": "1.2GiB", "connections": 6800, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "8.56GB", + "bandwidth": "8.54GB", "reconnects": 0, - "status_2xx": 2861261, + "status_2xx": 2854245, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -389,18 +389,18 @@ "static-tls-1024": { "framework": "bun", "language": "TS", - "rps": 484123, - "avg_latency": "2.28ms", - "p99_latency": "52.37ms", - "cpu": "6559.5%", + "rps": 483697, + "avg_latency": "2.25ms", + "p99_latency": "41.02ms", + "cpu": "6570.3%", "memory": "1.1GiB", "connections": 1024, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "7.39GB", + "bandwidth": "7.38GB", "reconnects": 0, - "status_2xx": 2469115, + "status_2xx": 2466825, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -408,18 +408,18 @@ "static-tls-4096": { "framework": "bun", "language": "TS", - "rps": 472364, - "avg_latency": "8.82ms", - "p99_latency": "158.86ms", - "cpu": "6478.5%", + "rps": 472705, + "avg_latency": "8.81ms", + "p99_latency": "139.55ms", + "cpu": "6523.5%", "memory": "1.1GiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "7.21GB", + "bandwidth": "7.22GB", "reconnects": 0, - "status_2xx": 2408605, + "status_2xx": 2410278, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -427,18 +427,18 @@ "static-tls-6800": { "framework": "bun", "language": "TS", - "rps": 461360, - "avg_latency": "14.83ms", - "p99_latency": "157.32ms", - "cpu": "6388.3%", + "rps": 462712, + "avg_latency": "14.82ms", + "p99_latency": "171.35ms", + "cpu": "6396.5%", "memory": "1.2GiB", "connections": 6800, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "7.04GB", + "bandwidth": "7.06GB", "reconnects": 0, - "status_2xx": 2352313, + "status_2xx": 2359400, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -446,19 +446,19 @@ "upload-256": { "framework": "bun", "language": "TS", - "rps": 1988, - "avg_latency": "124.38ms", - "p99_latency": "907.80ms", - "cpu": "5862.1%", - "memory": "2.6GiB", + "rps": 1998, + "avg_latency": "124.81ms", + "p99_latency": "715.00ms", + "cpu": "5901.9%", + "memory": "2.8GiB", "connections": 256, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "235.23KB/s", - "input_bw": "15.77GB/s", - "reconnects": 1956, - "status_2xx": 9941, + "bandwidth": "236.80KB/s", + "input_bw": "15.85GB/s", + "reconnects": 1990, + "status_2xx": 10091, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -466,19 +466,19 @@ "upload-32": { "framework": "bun", "language": "TS", - "rps": 1913, - "avg_latency": "16.69ms", - "p99_latency": "101.20ms", - "cpu": "3069.7%", - "memory": "2.4GiB", + "rps": 1903, + "avg_latency": "16.80ms", + "p99_latency": "99.90ms", + "cpu": "2993.9%", + "memory": "2.5GiB", "connections": 32, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "226.49KB/s", - "input_bw": "15.17GB/s", - "reconnects": 1915, - "status_2xx": 9569, + "bandwidth": "225.20KB/s", + "input_bw": "15.09GB/s", + "reconnects": 1907, + "status_2xx": 9516, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0