> Author: Anton Gladky <[email protected]> > Date: 2012-05-21 (Mon, 21 May 2012) > > Changed paths: > M core/BodyContainer.cpp > M core/BodyContainer.hpp > > Log Message: > ----------- > Give the newly created body an id, which is the size of bodyContainer. Remove lowestFree. Nicer fix for LP:1001194
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 _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

