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 32,971 of 33,346    |
|    =?ISO-8859-1?Q?=D6=F6_Tiib?= to David Lowndes    |
|    Re: Sequence container capacity after ca    |
|    03 Apr 13 11:28:05    |
   
   From: ootiib@hot.ee   
      
   On Wednesday, 3 April 2013 13:05:45 UTC+3, David Lowndes wrote:   
   > >Better algorithms.   
   >   
   > OK, fair enough, newer heap allocators may be faster than old basic   
   > ones, but they're still not trivial operations, and presumably will   
   > still have to employ locking strategies for multi-threaded   
   > environments?   
      
   Lock-less concurrent memory allocators, thread-local fast lists etc.   
      
   > i.e. In some situations they may be quite a lot better than less   
   > optimal old implementations used to be - but you should always   
   > consider them as having a notable performance impact?   
      
   Viewing dynamic memory management as always notable performance issue   
   is wrong. It has been worked on by so lot of people and symposiums   
   dedicated to memory management are regularly held and it has been   
   fruitful, even open source memory managers work very well.   
      
   Doing anything that is unneeded has some cost unless compiler   
   can optimize it out. Even unneeded division of two ints can affect   
   overall performance observably on such cases.   
      
   I am not certain if needless memory management may be optimized out,   
   but I suspect that no. At least I haven't seen any C++ compilers   
   attempting to optimize that:   
      
    int main(){delete new char;}   
      
   Everywhere it calls operator new and operator delete on whatever   
   optimization level despite to human eye it looks pointless to call   
   those. That means that dynamic memory management operations are   
   somehow considered externally observable behavior and so doing it   
   needlessly is doubly bad.   
      
      
   --   
    [ 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