logoalt Hacker News

bheadmaster01/21/20251 replyview on HN

Thank you for your helpful input.


Replies

orf01/21/2025

No worries, this help also generalises to any time you want to add locking/synchronisation or other overheads to a hot code path.

It’s best not to acquire a mutex and launch a goroutine to read 3 bytes of data at a time.

Also, hot tip: you can like… benchmark this. It’s not illegal.

show 1 reply