hashrocket / websocket-shootout

A comparison of websocket servers in multiple languages and frameworks
MIT License
429 stars 76 forks source link

Atomics instead of Mutex #57

Open ohler55 opened 6 years ago

ohler55 commented 6 years ago

By using atomics instead of a mutex the benchmark took overhead is decreased a little. I saw slightly better results using atomics. The difference may have been within statistical errors though. The first attempt with the change was 15% faster but subsequence runs were similar to with mutex. Anyway, fewer lines of code if you care.