Optimized loops on multimap(s)