C++ Logo


Advanced search

Re: Cache Alloc - 1.3x to 13.4x faster

From: Phil Bouchard <boost_at_[hidden]>
Date: Tue, 27 Jul 2021 13:21:03 -0400
On 7/27/21 1:08 PM, Thiago Macieira via Std-Proposals wrote:
> On Tuesday, 27 July 2021 09:26:33 PDT Phil Bouchard via Std-Proposals wrote:
>> Yes I can use a more efficient chained buffer but the
>> complexity remain the same.
> The problem is using a chained buffer in the first place. You're violating the
> engineer's motto: use the right tool for the right job.

Again, all these containers that will use the same cache_alloc won't
have to worry about how they implement the container. So I just think
this is a good way to abstract things.

> std::list and other chained containers are good for insertions at any point
> with constant timing and no copying/moving. They are not good for raw
> iteration performance or for overhead performance. They make far more
> allocations than an array container.
> Now, there's nothing wrong with improving std::list beyond what's already
> there for the use-cases it has. But I have not seen a comparison from you on
> whether changing containers would improve performance more than the effort
> you're going through.

Yeah that's because I had issues with the rebind stuff with other
containers (stack, queue, ...). Only lists don't suffer from this
problem in my system headers so I'm using them for the benchmark example
(why do we use rebind when we have template templates anyway?).

But please stay tuned, I'll do a full benchmark once I fix that.

*Phil Bouchard*
Founder & CTO
C.: (819) 328-4743
Fornux Logo <http://www.fornux.com>

Received on 2021-07-27 12:21:08