C++ Logo

std-proposals

Advanced search

Re: Request for Opinion: Goal-based Memory Allocation

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 05 Nov 2020 08:07:39 -0800
On Thursday, 5 November 2020 06:34:56 PST Scott Michaud via Std-Proposals
wrote:
> One benchmark used a Mersenne Twister to push random numbers onto a
> vector. The elements of that vector are then pushed onto two other
> vectors, one for even numbers and one for odd numbers. Each of these
> benchmarks were run on a 16-core, 32-thread AMD processor running
> Windows 10.
>
> * GCC 10.2 on MSYS2 took ~30% more time than std::allocate (one
> thread, release build).
> o std::allocator had better start to finish performance by ~1.25x.
> * MSVC 2019 took ~40% less time than std::allocate (one thread,
> release build).
> o DoubleStackAllocator had better start to finish performance by
> ~1.65x
> * MSVC 2019 took ~60% less time than std::allocate when running 15
> threads (release build).
> o DoubleStackAllocator had better start to finish performance by
> ~2.5x.

Please test a modern Linux with glibc 2.26 or newer (2.26 introduced tcache in
malloc).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2020-11-05 10:07:45