Commit edda9c6
committed
Add gobwas/ws and gorilla/websocket to mask benchmarks
On average, we are 1.75x faster than both now 🚀
goos: linux
goarch: amd64
pkg: nhooyr.io/websocket
Benchmark_mask/2/basic-8 263923018 4.55 ns/op 439.76 MB/s
Benchmark_mask/2/nhooyr-8 200203578 6.00 ns/op 333.32 MB/s
Benchmark_mask/2/gorilla-8 241622557 4.95 ns/op 404.38 MB/s
Benchmark_mask/2/gobwas-8 200392592 6.05 ns/op 330.69 MB/s
Benchmark_mask/3/basic-8 207684956 5.78 ns/op 519.07 MB/s
Benchmark_mask/3/nhooyr-8 169297215 7.10 ns/op 422.49 MB/s
Benchmark_mask/3/gorilla-8 205775799 5.81 ns/op 516.23 MB/s
Benchmark_mask/3/gobwas-8 165921662 7.23 ns/op 415.06 MB/s
Benchmark_mask/4/basic-8 167034886 7.18 ns/op 557.30 MB/s
Benchmark_mask/4/nhooyr-8 287656454 4.30 ns/op 931.11 MB/s
Benchmark_mask/4/gorilla-8 166140434 7.30 ns/op 547.57 MB/s
Benchmark_mask/4/gobwas-8 138138087 8.73 ns/op 458.20 MB/s
Benchmark_mask/8/basic-8 121179904 9.92 ns/op 806.67 MB/s
Benchmark_mask/8/nhooyr-8 199632992 6.07 ns/op 1318.60 MB/s
Benchmark_mask/8/gorilla-8 100000000 10.8 ns/op 739.65 MB/s
Benchmark_mask/8/gobwas-8 157898031 7.54 ns/op 1061.27 MB/s
Benchmark_mask/16/basic-8 73648268 16.5 ns/op 971.56 MB/s
Benchmark_mask/16/nhooyr-8 186871615 6.38 ns/op 2506.61 MB/s
Benchmark_mask/16/gorilla-8 72374540 16.6 ns/op 964.36 MB/s
Benchmark_mask/16/gobwas-8 127698723 9.36 ns/op 1709.99 MB/s
Benchmark_mask/32/basic-8 40010325 29.8 ns/op 1073.76 MB/s
Benchmark_mask/32/nhooyr-8 168590156 7.12 ns/op 4494.72 MB/s
Benchmark_mask/32/gorilla-8 67282072 17.7 ns/op 1808.59 MB/s
Benchmark_mask/32/gobwas-8 120038877 9.96 ns/op 3213.55 MB/s
Benchmark_mask/128/basic-8 10134963 118 ns/op 1082.74 MB/s
Benchmark_mask/128/nhooyr-8 100000000 11.8 ns/op 10852.23 MB/s
Benchmark_mask/128/gorilla-8 45452385 26.4 ns/op 4853.64 MB/s
Benchmark_mask/128/gobwas-8 57188290 20.8 ns/op 6153.80 MB/s
Benchmark_mask/512/basic-8 2707371 442 ns/op 1159.38 MB/s
Benchmark_mask/512/nhooyr-8 37049421 32.4 ns/op 15785.82 MB/s
Benchmark_mask/512/gorilla-8 19006171 62.8 ns/op 8150.01 MB/s
Benchmark_mask/512/gobwas-8 21394864 55.8 ns/op 9169.49 MB/s
Benchmark_mask/4096/basic-8 346566 3467 ns/op 1181.46 MB/s
Benchmark_mask/4096/nhooyr-8 5170425 232 ns/op 17648.07 MB/s
Benchmark_mask/4096/gorilla-8 2963664 405 ns/op 10105.59 MB/s
Benchmark_mask/4096/gobwas-8 2989596 402 ns/op 10192.40 MB/s
Benchmark_mask/16384/basic-8 86671 13833 ns/op 1184.38 MB/s
Benchmark_mask/16384/nhooyr-8 1332649 889 ns/op 18436.40 MB/s
Benchmark_mask/16384/gorilla-8 763900 1556 ns/op 10527.53 MB/s
Benchmark_mask/16384/gobwas-8 764034 1553 ns/op 10548.60 MB/s
PASS
ok nhooyr.io/websocket 64.091s
Results from a 8 GB 8 core Haswell VM on GCP.1 parent c781bdf commit edda9c6
3 files changed
+38
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
328 | | - | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
335 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
336 | 342 | | |
337 | 343 | | |
338 | 344 | | |
| |||
355 | 361 | | |
356 | 362 | | |
357 | 363 | | |
358 | | - | |
| 364 | + | |
359 | 365 | | |
360 | 366 | | |
361 | 367 | | |
| 368 | + | |
362 | 369 | | |
363 | | - | |
| 370 | + | |
364 | 371 | | |
365 | 372 | | |
366 | 373 | | |
| |||
370 | 377 | | |
371 | 378 | | |
372 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
373 | 396 | | |
374 | 397 | | |
375 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| 15 | + | |
| 16 | + | |
9 | 17 | | |
10 | 18 | | |
11 | 19 | | |
| |||
0 commit comments