> On Nov 1, 2013, at 5:56 AM, Roy Stogner <royst...@ices.utexas.edu> wrote: > > >> On Thu, 31 Oct 2013, John Peterson wrote: >> >> We build a std::map<> from Elem* to a unique sorted contiguous ID, as >> Metis only considers the active elements and needs >> some contiguous numbering. I expect that gets quite big, and maybe >> should be refactored to use a sorted >> std::vector<std::pair<Elem*, dof_id_type> > instead? >> You are quite correct about this. I ran our memory logger to compare the >> size of memory of a map<int,int> and a vector of >> pair<int,int>, both with 8M elements. The results were pretty striking: >> https://drive.google.com/file/d/0B9BK7pg8se_iaWFzbHlEemxmX0U/edit?usp=sharing >> >> The map's peak memory usage is almost exactly 6X that of the vector's... > > Wow, nasty. I was expecting 3X; I forgot about the sizeof(int*) == > 2*sizeof(int) issue. > > It's not really relevant here, but out of curiosity, could you give > unordered_map a try?
Sure, I had a plot with several different containers, but I forgot about the unordered ones. I'll make one later today. ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel