Thank you for your helpful input.
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.
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.