Replace std::rand() with std::mt19937 seeded by std::random_device for less predictable cache eviction. Also use .first from emplace() instead of structured binding with ignored second element.