不喜歡C++的unordered_map,主要的原因是慢,也不想重新刻一個好的hashmap,不過透過memory_resource中的工具,加快三倍速度,也能寫出簡易的beats 99%C++解答
考慮使用 PMR(多態記憶體資源),使用 std::pmr::unsynchronized_pool_resource,C++速度可以提高3 倍。使用了 4 個 pmr::unordered_map。
----
consider the PMR (Polymorphic Memory Resource), use pool as std::pmr::unsynchronized_pool_resource which can speed up 3 times of the speed.
4 pmr::unordered_map are in use.
沒有留言:
張貼留言