commit 2a6d34132026-11-01 12:41 UTC

Protocol performance.

Toloo vs IRC, XMPP, Matrix, Signal and Nostr. Lower is better.

01Latency

Toloo vs. other protocols

Mean latency on linux-x86. Bars are log-scaled; lower is better. Rows tagged est are reference estimates; untagged rows are measured.

close · < 1.5× slower much slower estestimate

Canonical Encode

Toloo 807 ns
IRC 150,000 ns 186x slower est
XMPP 800,000 ns 991x slower est
Matrix 1,100 ns 1.4x slower
Nostr 729 ns parity

Envelope Verify

Toloo 24,732 ns
IRC 50,000 ns 2.0x slower est
XMPP 300,000 ns 12x slower est
Matrix 31,517 ns 1.3x slower
Nostr 28,818 ns 1.2x slower

Signal has no per-message signatures.

Parse Envelope

Toloo 1,282 ns
IRC 20,000 ns 16x slower est
XMPP 150,000 ns 117x slower est
Matrix 758 ns 1.7x faster
Signal 217 ns 5.9x faster
Nostr 495 ns 2.6x faster

Event Build

Toloo 11,326 ns
IRC 100,000 ns 8.8x slower est
XMPP 500,000 ns 44x slower est
Matrix 17,731 ns 1.6x slower
Nostr 48,142 ns 4.3x slower

Signal has no signed-event build step.

Pool Query (1k)

Toloo 9,808 ns
IRC 500,000 ns 51x slower est
XMPP 2,000,000 ns 204x slower est
Matrix 8,000,000 ns 816x slower est

Crypto (ed25519)

Toloo 24,817 ns
IRC 45,000 ns 1.8x slower est
XMPP 200,000 ns 8.1x slower est
Matrix 30,597 ns 1.2x slower

Nostr uses Schnorr (secp256k1); Signal is not ed25519.

Private Message (1:1)

Toloo 3,602 ns
Signal 9,290 ns 2.6x slower
Matrix 15,148 ns 4.2x slower
Nostr 3,706 ns parity
Toloo 2,995 ns
Signal 92,059 ns 31x slower
Matrix 3,297 ns 1.1x slower
Nostr 3,844 ns 1.3x slower

First message incl. setup, send → receive: Signal 303.4 µs → 278.1 µs · Olm 128.7 µs → 105.4 µs · Toloo 26.1 µs → 25.5 µs · Nostr 31.7 µs → 31.9 µs

02Platforms

Cross-platform latency

Mean latency by platform.

Canonical Encode
linux-x86
807 ns
linux-arm
1.5 µs
windows
1.8 µs
macos-x86
2.6 µs
macos-arm
2.1 µs
Envelope Verify
linux-x86
24.7 µs
linux-arm
42.6 µs
windows
37.0 µs
macos-x86
57.9 µs
macos-arm
37.3 µs
Parse Envelope
linux-x86
1.3 µs
linux-arm
1.8 µs
windows
3.2 µs
macos-x86
2.3 µs
macos-arm
3.2 µs
Event Build
linux-x86
11.3 µs
linux-arm
21.7 µs
windows
130.2 µs
macos-x86
20.4 µs
macos-arm
19.1 µs
Pool Query (1k)
linux-x86
9.8 µs
linux-arm
10.2 µs
windows
9.4 µs
macos-x86
6.0 µs
macos-arm
7.3 µs
Crypto (ed25519)
linux-x86
24.8 µs
linux-arm
41.3 µs
windows
37.5 µs
macos-x86
34.8 µs
macos-arm
41.6 µs
linux-x86 linux-arm windows macos-x86 macos-arm

03Capacity

Throughput & headroom

Background load 300msg/s
Single thread ~13,741msg/s
Steady headroom 45.8×
Burst headroom 0.92×

0× · tick = 1× saturation50× scale

Throughput

Config msg/s Users@ 0.1 msg/s Rooms
1 thread 13,741 137,410 10
4 threads 43,971 439,710 40
16 threads 116,798 1,167,980 160
64 threads 247,338 2,473,380 640

Key results

linux-x86
Canonical Encode 807 ns
Envelope Verify 24.7 µs
Parse Envelope 1.3 µs
Event Build 11.3 µs
Pool Query (1k) 9.8 µs
Crypto (ed25519) 24.8 µs

< 50 µs 50–100 µs ≥ 100 µs