This project is mirrored from https://github.com/nhooyr/websocket.
Pull mirroring updated .
- Mar 14, 2025
-
-
Mathias Fredriksson authored
-
Mathias Fredriksson authored
-
- Aug 09, 2024
-
-
Ammar Bandukwala authored
This will create easily solved breakage on updates but I figure it's best to pull the band aid off as early as possible
-
- Feb 22, 2024
-
-
Anmol Sethi authored
Standard library does this too. Unfortunate wish they just exposed it in the standard library. Perhaps we can isolate the specific code we need later.
-
Anmol Sethi authored
I'm just not good enough at assembly. I added tests to confirm that @wdvxdr's implementation works correctly and matches the output of the basic masking loop.
-
Anmol Sethi authored
-
- Oct 26, 2023
-
-
Anmol Sethi authored
Slower for some reason than just SIMD. Also no dependency on cpu package is nice.
-
wdvxdr authored
goos: windows goarch: amd64 pkg: nhooyr.io/websocket cpu: Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz Benchmark_mask/2/basic-8 425339004 2.795 ns/op 715.66 MB/s Benchmark_mask/2/nhooyr-8 379937766 3.186 ns/op 627.78 MB/s Benchmark_mask/2/gorilla-8 392164167 3.071 ns/op 651.24 MB/s Benchmark_mask/2/gobwas-8 310037222 3.880 ns/op 515.46 MB/s Benchmark_mask/3/basic-8 321408024 3.806 ns/op 788.32 MB/s Benchmark_mask/3/nhooyr-8 350726338 3.478 ns/op 862.58 MB/s Benchmark_mask/3/gorilla-8 332217727 3.634 ns/op 825.43 MB/s Benchmark_mask/3/gobwas-8 247376214 4.886 ns/op 614.01 MB/s Benchmark_mask/4/basic-8 261182472 4.582 ns/op 872.91 MB/s Benchmark_mask/4/nhooyr-8 381830712 3.262 ns/op 1226.05 MB/s Benchmark_mask/4/gorilla-8 272616304 4.395 ns/op 910.04 MB/s Benchmark_mask/4/gobwas-8 204574558 5.855 ns/op 683.19 MB/s Benchmark_mask/8/basic-8 191330037 6.162 ns/op 1298.24 MB/s Benchmark_mask/8/nhooyr-8 369694992 3.285 ns/op 2435.65 MB/s Benchmark_mask/8/gorilla-8 175388466 6.743 ns/op 1186.48 MB/s Benchmark_mask/8/gobwas-8 241719933 4.886 ns/op 1637.45 MB/s Benchmark_mask/16/basic-8 100000000 10.92 ns/op 1464.83 MB/s Benchmark_mask/16/nhooyr-8 272565096 4.436 ns/op 3606.98 MB/s Benchmark_mask/16/gorilla-8 100000000 11.20 ns/op 1428.53 MB/s Benchmark_mask/16/gobwas-8 221356798 5.405 ns/op 2960.45 MB/s Benchmark_mask/32/basic-8 61476984 20.40 ns/op 1568.80 MB/s Benchmark_mask/32/nhooyr-8 238665572 5.050 ns/op 6337.22 MB/s Benchmark_mask/32/gorilla-8 100000000 12.09 ns/op 2647.28 MB/s Benchmark_mask/32/gobwas-8 186077235 6.477 ns/op 4940.36 MB/s Benchmark_mask/128/basic-8 14629720 80.90 ns/op 1582.19 MB/s Benchmark_mask/128/nhooyr-8 181241968 6.565 ns/op 19497.98 MB/s Benchmark_mask/128/gorilla-8 68308342 16.76 ns/op 7639.37 MB/s Benchmark_mask/128/gobwas-8 94582026 12.97 ns/op 9872.11 MB/s Benchmark_mask/512/basic-8 3921001 305.6 ns/op 1675.55 MB/s Benchmark_mask/512/nhooyr-8 123102199 9.721 ns/op 52669.11 MB/s Benchmark_mask/512/gorilla-8 32355914 38.18 ns/op 13411.43 MB/s Benchmark_mask/512/gobwas-8 31528501 37.80 ns/op 13544.37 MB/s Benchmark_mask/4096/basic-8 491804 2381 ns/op 1720.39 MB/s Benchmark_mask/4096/nhooyr-8 26159691 46.98 ns/op 87187.73 MB/s Benchmark_mask/4096/gorilla-8 4898440 243.6 ns/op 16817.89 MB/s Benchmark_mask/4096/gobwas-8 4336398 277.2 ns/op 14776.40 MB/s Benchmark_mask/16384/basic-8 113842 9623 ns/op 1702.66 MB/s Benchmark_mask/16384/nhooyr-8 8088847 154.5 ns/op 106058.18 MB/s Benchmark_mask/16384/gorilla-8 1282993 933.6 ns/op 17549.90 MB/s Benchmark_mask/16384/gobwas-8 997347 1086 ns/op 15093.49 MB/s We're about 4-5x faster then gorilla now.
-
- Oct 13, 2023
-
-
Anmol Sethi authored
Closes #297
-
Anmol Sethi authored
-
- Oct 10, 2023
-
-
Anmol Sethi authored
-
Anmol Sethi authored
-
Jacalz authored
Fixes https://github.com/nhooyr/websocket/issues/359
-
- May 18, 2020
-
-
Anmol Sethi authored
Closes #220 and #230
-
- May 10, 2020
-
-
Anmol Sethi authored
Closes #166
-
- Mar 22, 2020
-
-
Anmol Sethi authored
-
- Feb 16, 2020
-
-
Anmol Sethi authored
- Feb 09, 2020
-
-
Anmol Sethi authored
-
Anmol Sethi authored
-
Anmol Sethi authored
-
Anmol Sethi authored
Closes #182
-
- Dec 31, 2019
-
-
Anmol Sethi authored
-
- Dec 19, 2019
-
-
Anmol Sethi authored
Closes #179
-
- Nov 29, 2019
-
-
Anmol Sethi authored
-
Anmol Sethi authored
-
Anmol Sethi authored
-
- Nov 09, 2019
-
-
Anmol Sethi authored
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.
-
- Oct 09, 2019
-
-
Anmol Sethi authored
Much faster.
-
Anmol Sethi authored
-
Anmol Sethi authored
I changed my mind after #103 as browsers include a wasClean event to indicate whether the connection was closed cleanly. From my tests, if a server using this library prior to this commit initiates the close handshake, wasClean will be false for the browser as the connection was closed before it could respond with a close frame. Thus, I believe it's necessary to fully implement the close handshake. @stephenyama You'll enjoy this.
-
- Oct 08, 2019
-
-
Anmol Sethi authored
-
- Sep 29, 2019
-
-
Anmol Sethi authored
Subprotocols didn't work with WASM at all before.
-
- Sep 22, 2019
-
-
Anmol Sethi authored
-
Anmol Sethi authored
-
- Sep 21, 2019
-
-
Anmol Sethi authored
Closes #121
-
Anmol Sethi authored
-
- Sep 20, 2019
-
-
Anmol Sethi authored
-
- Sep 04, 2019
-
-
Anmol Sethi authored
The boys in the office hated it. Highly unfortunate but makes sense as it seems confusing.
-
Anmol Sethi authored
-