Open mnhkahn opened 9 years ago
Under what conditions did you test the performance gains you got from these changes?
How much of a gain did you get with each one independently?
How much of a gain did you get with them combined?
I'm particularly curious about the buffered wch
-- buffering it will definitely make it use (a little) more memory, but it seems unlikely it would actually make it faster in any way that's worth the its weight in buffer overhead.
I want to use
GetBulk
to fetch data, which fetches multiple keys concurrently. But the source code of this function use only 4 worker goroutines to fetch concurrently, I think the count islen(kdm)
is better. And the channel of key,wch
, I think it should be allocated with enough buffer, like this,wch := make(chan uint16, len(kdm)
.