add multidelete support.
poonai opened this issue · comments
Support multi delete.
Make Del as a vardic function to support delete.
I would be happy to implement this if you need an extra pair of hands.
@balajijinnah @momilo As I mentioned to @manishrjain there will be no performance gains in adding a MultiDelete function until we move from a sharded map implementation (if we do). Based on experiments at https://github.com/karlmcguire/stress we've found that the fastest overall solution is the one we're currently using: a sharded hashmap and calling Del on each shard.
Therefore, for MultiDelete the fastest solution is indeed the simplest most idiomatic one:
func (m *Map) MultiDel(keys []uint64) {
for _, key := range keys {
m.shards[key&shardMask].Del(key)
}
}
This issue should be on hold until we change the underlying hashmap. For now, just call Del
multiple times in a for loop.