Re: Fix __gnu_cxx::throw_allocator 2 * O(log(N)) complexity

2018-11-19 Thread Jonathan Wakely
On 13/11/18 07:15 +0100, François Dumont wrote: Oops, it was not the tested patch. Here it is. On 11/12/18 7:43 AM, François Dumont wrote: When doing some debugging session I noticed that the __gnu_cxx::throw_allocator doubles all lookup on both insert and erase. Using map::insert result

Re: Fix __gnu_cxx::throw_allocator 2 * O(log(N)) complexity

2018-11-12 Thread François Dumont
Oops, it was not the tested patch. Here it is. On 11/12/18 7:43 AM, François Dumont wrote: When doing some debugging session I noticed that the __gnu_cxx::throw_allocator doubles all lookup on both insert and erase. Using map::insert result and erasing the found iterator avoids this double

Fix __gnu_cxx::throw_allocator 2 * O(log(N)) complexity

2018-11-11 Thread François Dumont
When doing some debugging session I noticed that the __gnu_cxx::throw_allocator doubles all lookup on both insert and erase. Using map::insert result and erasing the found iterator avoids this double lookup.     * include/ext/throw_allocator.h     (annotate_base::insert(void*, size_t)): Use