4 ms·
Can’t really say what’s going on here without seeing some code.
by bouk 7y ago
Can’t really say what’s going on here without seeing some code.
- Insanity 7y agoWell the code is the same for all of them (but when using a bool map we assign true instead of empty struct). So we run this code inside a benchmarking function: m := map[int]interface{} // or m := map[int]struct{} for i := 0; i < t.N; i++ { m[i] = struct{}{} } edit: fix code.