This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Use a std::vector instead of a std::map to hold Input_merge_map
- From: Sriraman Tallam <tmsriram at google dot com>
- To: Rafael EspÃndola <rafael dot espindola at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>, Cary Coutant <ccoutant at gmail dot com>
- Date: Wed, 20 May 2015 08:30:33 -0700
- Subject: Re: [patch] Use a std::vector instead of a std::map to hold Input_merge_map
- Authentication-results: sourceware.org; auth=none
- References: <CAG3jReK3HdZfV7R6Kp_ijWX0UF6EoNuZdFN2XJQ=jLNWBp0fwQ at mail dot gmail dot com> <CAG3jReLNg36sZDiJYTK-zDV1RwyMLadHHpJEbgc7VJUzFP=aOQ at mail dot gmail dot com>
Some minor changes:
+ const Section_merge_maps &maps = this->section_merge_maps_;
+ for (Section_merge_maps::const_iterator i = maps.begin(), e =maps.end();
+ i != e; ++i) {
space between '=' and maps.end()
'{' should come in a new line?
Otherwise patch makes the code simpler and looks good to me. I do not
have the authority to approve.
Thanks
Sri
On Wed, May 20, 2015 at 6:12 AM, Rafael EspÃndola
<rafael.espindola@gmail.com> wrote:
> ping
>
> On 23 April 2015 at 12:36, Rafael EspÃndola <rafael.espindola@gmail.com> wrote:
>> A std::map is hardly the best data structure for a small map from
>> small integers.
>>
>> The attached patch uses a std::vector<std::pair>> instead.
>>
>> This simplifies the code and speeds up linking of chromium (see
>> attached perf logs).
>>
>> Cheers,
>> Rafael
>>
>> 2015-04-23 Rafael Ãvila de EspÃndola <rafael.espindola@gmail.com>
>>
>> * merge.cc (get_input_merge_map): Update for data structure change.
>> (get_or_make_input_merge_map): Update for data structure change.
>> * merge.h (Object_merge_map): Use a std::vector<std::pair>> instead of
>> a std::map.