Use std::unordered_map to index events