[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ hash map usage
From: |
Gavin Smith |
Subject: |
Re: C++ hash map usage |
Date: |
Sat, 19 Oct 2024 20:31:47 +0100 |
On Fri, Oct 18, 2024 at 04:14:24PM +0100, Gavin Smith wrote:
> On Thu, Oct 17, 2024 at 09:31:35PM +0200, Patrice Dumas wrote:
> > > > 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.
> > >
> > > I've started the code for this, but as I am not familiar with the
> > > XS conversion code at all, it would take me some time to work out
> > > how to get all of this information. I tried copying code from
> > > elsewhere to access self->document in html_converter_customize in
> > > html_prepare_converter.c, but this wasn't set yet.
> >
> > Here is a proposal. I think that the hash maps initializations should
> > better be done in html_prepare_conversion_units_targets, they should not
> > be used before.
>
> That's great, thanks. I've applied the changes for using the C hashmap
> implementation.
I removed the C++ implementation, but a further simplification would
be to remove the other two implementations (IDT_perl_hashmap and
IDF_string_list). This would allow removing the enum ids_data_type
(values IDT_*) and the CONVF_* arguments, and the source and header
files for those two implementations.
- Re: Flood of commits from July?, (continued)
- 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, 2024/10/15
- 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 <=
- 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
- Re: Flood of commits from July?, Gavin Smith, 2024/10/05
- Re: Flood of commits from July?, Per Bothner, 2024/10/05
- Re: Flood of commits from July?, Eli Zaretskii, 2024/10/06
- Re: Flood of commits from July?, Per Bothner, 2024/10/06
- Re: Flood of commits from July?, Eli Zaretskii, 2024/10/06
- Re: Flood of commits from July?, Gavin Smith, 2024/10/06
- Re: Flood of commits from July?, Per Bothner, 2024/10/07