2012/5/21 Bruno Chareyre <[email protected]>: > > Sure of that? > The size of the container will increase forever, no? > > In addition, insert(b,id=size) triggers body.resize(id+1), which is > horrible in terms of cpu time (create a new vector, copy the old vector > into it, erase the old one). > For inserting 100 new bodies in 100k bodies, you will move and delete > ~10^7 shared pointers. > > lowestFree was a smart trick IMO. > > Bruno
I think, it is correct. This lowestFree variable can have only an advantage, when you delete the last created body. It is a specific case and I do not think it happens often. It causes also LP:1001194, which is critical. >From my point of view it is the best solution without complicating the code. Anton _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

