Add multidelete support

Moved from GitHub ristretto/109

Posted by balajijinnah:

Support multi delete.

Make Del as a vardic function to support delete.

momilo commented :

I would be happy to implement this if you need an extra pair of hands.

balajijinnah commented :

@momilo Feel free to take it.

karlmcguire commented :

@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 GitHub - karlmcguire/stress: Stress testing hashmap implemenations for Ristretto. 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.