avoid pairs() for entity storage iteration in inner loops (because it's not JIT compiled)