Skip to content

Commit fa825fd

Browse files
committed
Mention masking algorithm performance in README.md
1 parent edda9c6 commit fa825fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ In terms of performance, the differences mostly depend on your application code.
138138
reuses message buffers out of the box if you use the wsjson and wspb subpackages.
139139
As mentioned above, nhooyr.io/websocket also supports concurrent writers.
140140

141+
The WebSocket masking algorithm used by this package is also [1.75x](https://github.com/nhooyr/websocket/releases/tag/v1.7.4) faster
142+
on average than gorilla/websocket or gobwas/ws while using pure safe Go.
143+
141144
The only performance con to nhooyr.io/websocket is that it uses one extra goroutine to support
142145
cancellation with context.Context. This costs 2 KB of memory which is cheap compared to
143146
the benefits.

0 commit comments

Comments
 (0)