C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Q: invariant for unordered_set and unordered_map "hash" and "comp" argument

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sat, 28 Nov 2026 16:45:13 -0800
On Saturday, 28 November 2026 15:24:13 Pacific Standard Time Aleksandr
Povaliaev via Std-Proposals wrote:
> I wrote: "Second, this is an ineffective way of storing Key in
> cache-friendly unordered_set structure (not so friendly 😀 but more
> friendly then, let's say, std::set)."

unordered_set is not cache-friendly in the first place. The size of the key is
the least of the problems. And besides, what matters is the total payload size
(key + value), so moving from the key to the payload changes absolutely
nothing.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-11-29 00:45:16