On Tuesday November 30 2010 10:08:07 Martin Sandve Alnæs wrote: > I haven't looked at the code, but just some general STL advice: > - Never use std::find on map and set types in stl, use their member > function find instead. std::find could be a linear search in this > case...
I do not think we do that. Default in DOLFIN we use a home brewed Set, which basically is a std::vector with set functionality. Set::insert used alot of time when global dofs where inserted as std::find was called on a std::vector each time. Using a boost::unordored_set instead of dolfin::Set more or less removed that bottle neck. Garth has implemented a typedef switch so a user can deside which container he want to use, dolfin::Set, std::set, boost::unordered_set. Afaik, each has its advantages and disadvantages. Johan _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp