[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ hash map usage
From: |
Patrice Dumas |
Subject: |
Re: C++ hash map usage |
Date: |
Wed, 16 Oct 2024 00:50:01 +0200 |
On Tue, Oct 15, 2024 at 12:31:07PM +0100, Gavin Smith wrote:
> On Mon, Oct 14, 2024 at 11:16:58PM +0200, Patrice Dumas wrote:
> > This looks good to me, it is quite simple. Maybe the number of buckets
> > could be set based on the number of sections + nodes + index entries?
>
> Great idea, I was concerned that I'd hardcoded the number of buckets.
Could add the number of footnotes * 2 and the number of special units
(including special units not associated to a section/node). And
sections number should be * 3 for contents and shortcontents targets.
Also maybe the buckets memory should be allocated to that same number,
(number of sections * 3 + number of headings + number of (nodes,
anchors, floats) + number of index entries + number of footnotes * 2
+ number of special units) as we know in advance there there will be
this number of registered ids.
--
Pat
- Re: C++ hashmap implementation, (continued)
- Re: C++ hashmap implementation, Patrice Dumas, 2024/10/06
- Re: C++ hashmap implementation, Patrice Dumas, 2024/10/06
- Re: C++ hashmap implementation, Patrice Dumas, 2024/10/06
- Re: C++ hashmap implementation, Gavin Smith, 2024/10/15
- Re: C++ hashmap implementation, Patrice Dumas, 2024/10/15
- Re: Flood of commits from July?, Patrice Dumas, 2024/10/06
- C++ hash map usage, Gavin Smith, 2024/10/14
- Re: C++ hash map usage, Gavin Smith, 2024/10/14
- Re: C++ hash map usage, Patrice Dumas, 2024/10/14
- Re: C++ hash map usage, Gavin Smith, 2024/10/15
- Re: C++ hash map usage,
Patrice Dumas <=
- Re: C++ hash map usage, Gavin Smith, 2024/10/17
- Re: C++ hash map usage, Patrice Dumas, 2024/10/17
- Re: C++ hash map usage, Patrice Dumas, 2024/10/17
- Re: C++ hash map usage, Gavin Smith, 2024/10/18
- Re: C++ hash map usage, Gavin Smith, 2024/10/19
- Re: Flood of commits from July?, Patrice Dumas, 2024/10/06
Re: Flood of commits from July?, Patrice Dumas, 2024/10/05
Re: Flood of commits from July?, Per Bothner, 2024/10/05