Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frameworks/typev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /app
# typev VM — binary + FFI plugins (json, stdcore, stdsocket, ...). Pre-built
# (-O3 -march=x86-64-v3, static liburing) and fetched from object storage
RUN wget -q -O /tmp/typev.zip \
https://typev.s3.fr-par.scw.cloud/typev-21-05-2026.zip && \
https://typev.s3.fr-par.scw.cloud/typev-23-05-2026-v2.zip && \
unzip -q /tmp/typev.zip -d /app && \
rm /tmp/typev.zip

Expand Down
25 changes: 8 additions & 17 deletions frameworks/typev/bundle/benchmark-code/src/main.tc
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,14 @@ fn drainUpload(fd: int, buf: byte[], bufcap: uint, bodyStart: uint, cl: uint, cu

// Serve one connection.
fn handle_client(fd: int) -> void {
// resizeRaw: these buffers are write-before-read (tcp_read fills, parser
// reads only up to the filled length), so skip the per-connection zero-fill.
let buf: byte[] = []
buf.resize(BUFCAP)
buf.resizeRaw(BUFCAP)
let tmp: byte[] = []
tmp.resize(BUFCAP)
tmp.resizeRaw(BUFCAP)
let obuf: byte[] = []
obuf.resize(OBUFCAP)
obuf.resizeRaw(OBUFCAP)
// Parse scratch — created once, reused for every request.
let req = newReq()
let chunk = newChunk()
Expand Down Expand Up @@ -277,22 +279,11 @@ fn accept_loop() -> void {
fn main() -> uint {
println("typev HttpArena server listening on :8080")

foreach i in 0, 3, 1 {
let keepalive = spawn accept_loop()
foreach i in 0, 2, 1 {
spawn accept_loop()
}

let server = tcp_listen(PORT, 4096)
if server < 0 {
println("Failed to start server")
return 1u
}

while true {
let client = tcp_accept(server)
if client >= 0 {
spawn handle_client(client)
}
}
let (_r, _s) = keepalive.await()

return 0u
}
Binary file modified frameworks/typev/bundle/output.tvbc
Binary file not shown.
16 changes: 8 additions & 8 deletions site/data/baseline-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,19 +1308,19 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 2238245,
"avg_latency": "160us",
"p99_latency": "681us",
"cpu": "6230.3%",
"memory": "448MiB",
"rps": 2159262,
"avg_latency": "150us",
"p99_latency": "729us",
"cpu": "6556.8%",
"memory": "396MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "192.04MB/s",
"input_bw": "172.90MB/s",
"bandwidth": "185.27MB/s",
"input_bw": "166.80MB/s",
"reconnects": 0,
"status_2xx": 11191228,
"status_2xx": 10796310,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
16 changes: 8 additions & 8 deletions site/data/baseline-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,19 +1308,19 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 2230325,
"avg_latency": "125us",
"p99_latency": "665us",
"cpu": "6378.6%",
"memory": "211MiB",
"rps": 2232140,
"avg_latency": "107us",
"p99_latency": "636us",
"cpu": "6380.0%",
"memory": "156MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "191.36MB/s",
"input_bw": "172.29MB/s",
"bandwidth": "191.53MB/s",
"input_bw": "172.43MB/s",
"reconnects": 0,
"status_2xx": 11151628,
"status_2xx": 11160704,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
2 changes: 1 addition & 1 deletion site/data/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"threads_per_core": "2",
"ram": "251Gi",
"os": "Ubuntu 24.04.4 LTS",
"kernel": "6.17.0-22-generic",
"kernel": "6.17.0-29-generic",
"docker": "29.3.0",
"docker_runtime": "runc",
"governor": "performance",
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-16384.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,18 +369,18 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 3048278,
"avg_latency": "170us",
"p99_latency": "1.53ms",
"cpu": "6266.4%",
"memory": "751MiB",
"rps": 2681888,
"avg_latency": "160us",
"p99_latency": "1.02ms",
"cpu": "6185.7%",
"memory": "818MiB",
"connections": 16384,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "20.37MB/s",
"bandwidth": "18.01MB/s",
"reconnects": 0,
"status_2xx": 15241392,
"status_2xx": 13409442,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,18 +369,18 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 2981735,
"avg_latency": "145us",
"p99_latency": "548us",
"cpu": "6441.7%",
"memory": "450MiB",
"rps": 2738284,
"avg_latency": "140us",
"p99_latency": "639us",
"cpu": "6294.2%",
"memory": "464MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "19.90MB/s",
"bandwidth": "18.28MB/s",
"reconnects": 0,
"status_2xx": 14908675,
"status_2xx": 13691422,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,18 +369,18 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 3017632,
"avg_latency": "105us",
"p99_latency": "480us",
"cpu": "6739.4%",
"memory": "269MiB",
"rps": 2839865,
"avg_latency": "93us",
"p99_latency": "474us",
"cpu": "6717.4%",
"memory": "177MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "20.14MB/s",
"bandwidth": "18.95MB/s",
"reconnects": 0,
"status_2xx": 15088164,
"status_2xx": 14199326,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-pipeline-16384.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,18 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 19139286,
"avg_latency": "308us",
"p99_latency": "1.04ms",
"cpu": "6358.2%",
"memory": "458MiB",
"rps": 18274678,
"avg_latency": "386us",
"p99_latency": "2.74ms",
"cpu": "6083.0%",
"memory": "362MiB",
"connections": 16384,
"threads": 64,
"duration": "5s",
"pipeline": 16,
"bandwidth": "127.73MB/s",
"bandwidth": "121.96MB/s",
"reconnects": 0,
"status_2xx": 95696432,
"status_2xx": 91373392,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-pipeline-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,18 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 19362240,
"avg_latency": "184us",
"p99_latency": "846us",
"cpu": "6677.0%",
"memory": "422MiB",
"rps": 18343548,
"avg_latency": "219us",
"p99_latency": "458us",
"cpu": "6309.3%",
"memory": "458MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 16,
"bandwidth": "129.22MB/s",
"bandwidth": "122.41MB/s",
"reconnects": 0,
"status_2xx": 96811200,
"status_2xx": 91717744,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-pipeline-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,18 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 18460480,
"avg_latency": "166us",
"p99_latency": "140us",
"cpu": "6464.7%",
"memory": "273MiB",
"rps": 18372604,
"avg_latency": "146us",
"p99_latency": "135us",
"cpu": "6378.4%",
"memory": "182MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 16,
"bandwidth": "123.20MB/s",
"bandwidth": "122.61MB/s",
"reconnects": 0,
"status_2xx": 92302400,
"status_2xx": 91863023,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
18 changes: 9 additions & 9 deletions site/data/json-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -1036,19 +1036,19 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 1194865,
"avg_latency": "3.00ms",
"p99_latency": "2.70ms",
"cpu": "6751.2%",
"memory": "673MiB",
"rps": 1227325,
"avg_latency": "2.96ms",
"p99_latency": "82.00ms",
"cpu": "6396.4%",
"memory": "720MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "4.02GB/s",
"input_bw": "56.98MB/s",
"reconnects": 238578,
"status_2xx": 5974326,
"bandwidth": "4.13GB/s",
"input_bw": "58.52MB/s",
"reconnects": 244966,
"status_2xx": 6136626,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
18 changes: 9 additions & 9 deletions site/data/limited-conn-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,19 +1308,19 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 1544570,
"avg_latency": "2.61ms",
"p99_latency": "155.40ms",
"cpu": "6625.4%",
"memory": "379MiB",
"rps": 1674965,
"avg_latency": "2.43ms",
"p99_latency": "34.40ms",
"cpu": "6595.2%",
"memory": "472MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "132.55MB/s",
"input_bw": "119.31MB/s",
"reconnects": 772280,
"status_2xx": 7722850,
"bandwidth": "143.72MB/s",
"input_bw": "129.39MB/s",
"reconnects": 837480,
"status_2xx": 8374829,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
18 changes: 9 additions & 9 deletions site/data/limited-conn-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,19 +1308,19 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 1496006,
"avg_latency": "331us",
"p99_latency": "8.95ms",
"cpu": "6641.2%",
"memory": "257MiB",
"rps": 1708478,
"avg_latency": "289us",
"p99_latency": "4.52ms",
"cpu": "6541.8%",
"memory": "314MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "128.39MB/s",
"input_bw": "115.56MB/s",
"reconnects": 747995,
"status_2xx": 7480034,
"bandwidth": "146.60MB/s",
"input_bw": "131.98MB/s",
"reconnects": 854230,
"status_2xx": 8542394,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/pipelined-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -1239,18 +1239,18 @@
{
"framework": "typev",
"language": "Type-C",
"rps": 46959193,
"avg_latency": "262us",
"p99_latency": "1.20ms",
"cpu": "6257.5%",
"memory": "380MiB",
"rps": 46159084,
"avg_latency": "189us",
"p99_latency": "731us",
"cpu": "6258.8%",
"memory": "451MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 16,
"bandwidth": "3.93GB/s",
"bandwidth": "3.87GB/s",
"reconnects": 0,
"status_2xx": 234795968,
"status_2xx": 230795424,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
Loading