home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,578 of 33,346   
   Dave Abrahams to All   
   Re: Performance difference between std::   
   21 Oct 11 05:15:19   
   
   3d902245   
   From: dave@boostpro.com   
      
   on Thu Oct 20 2011, "gast128-AT-hotmail.com"  wrote:   
      
   > Hello all   
   >   
   > we use here Visual Studio 2010 and notice quite an impressive   
   > performance difference between the boost and std unordered_map: about   
   > a factor 10 in favor of the boost implementation. Is there something   
   > specified in the std which makes them slower?   
   >   
   > boost::unordered_map    0.574148   
   > stl::unordered_map        5.758360   
   > stl::map                       17.927353   
      
   Only a great deal of flexibility left to the implementor w.r.t. how to   
   implement the map.  The Dinkumware version of the hash containers (which   
   is shipped in a modified form by Microsoft) IIUC uses a scheme of   
   incremental rehashing and keeps everything in a doubly-linked list,   
   which has certain functionality benefits but also some intrinsic costs.   
   Then there's also the question of whether you are using VS2010 in   
   "secure" mode, which does a lot of potentially-expensive error checking   
   that Boost does not, at least by default.   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca