Hi @5argon
You can have parallel iterating with Interface IJobNativeMultiHashMapMergedSharedKeyIndices | Package Manager UI website.
It is better explained in this talk: How does IJobNativeMultiHashMapMergedSharedKeyIndices work?
Or:
var highest = -1;
if (HashMap.TryGetFirstValue(faction, out int level, out NativeMultiHashMapIterator<int> iterator))
{
highest = level;
while (HashMap.TryGetNextValue(out level, ref iterator))
{
if(level > highest)
highest = level;
}
}
Schedule it per faction. I use it for my network prototype. Getting 1 million iteration over 7 workers in ~1ms
Hope it helps.