Is gcc std::unordered_map implementation slow? If so - why?

后端 未结 3 1058
旧时难觅i
旧时难觅i 2020-12-02 08:31

We are developing a highly performance critical software in C++. There we need a concurrent hash map and implemented one. So we wrote a benchmark to figure out, how much slo

3条回答
  •  不思量自难忘°
    2020-12-02 09:08

    I found the reason: it is a Problem of gcc-4.7!!

    With gcc-4.7

    inserts: 37728
    get    : 2985
    

    With gcc-4.6

    inserts: 2531
    get    : 1565
    

    So std::unordered_map in gcc-4.7 is broken (or my installation, which is an installation of gcc-4.7.0 on Ubuntu - and another installation which is gcc 4.7.1 on debian testing).

    I will submit a bug report.. until then: DO NOT use std::unordered_map with gcc 4.7!

提交回复
热议问题