)]}'
{
  "commit": "ebfdb1089bc84fafa7001e7ff2e9c389c11437a6",
  "tree": "d719cde64fafb242c9452f549d6191d1d5c0b16b",
  "parents": [
    "8cbf7d2a4748b37d70323f45a378aee8a9a96f8a"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@polymtl.ca",
    "time": "Mon Mar 24 16:20:28 2025 -0400"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Tue Mar 25 11:44:37 2025 -0400"
  },
  "message": "gdb/dwarf: use std::equal_range in cooked_index_shard::find\n\nLooking at `cooked_index_shard::find`, I thought that we could make a\nsmall optimization: when finding the upper bound, we already know the\nlower bound.  And we know that the upper bound is \u003e\u003d the lower bound.\nSo we could pass `lower` as the first argument of the `std::upper_bound`\ncall to cut the part of the search space that is below `lower`.\n\nIt then occured to me that what we do is basically what\n`std::equal_range` is for, so why not use it.  Implementations of\n`std::equal_range` are likely do to things as efficiently as possible.\n\nUnfortunately, because `cooked_index_entry::compare` is sensitive to the\norder of its parameters, we need to provide two different comparison\nfunctions (just like we do know, to the lower_bound and upper_bound\ncalls).  But I think that the use of equal_range makes it clear what the\nintent of the code is.\n\nRegression tested using the various DWARF target boards on Debian 12.\n\nChange-Id: Idfad812fb9abae1b942d81ad9976aeed7c2cf762\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1a2e19debab597016b52eebd99cb0a3f69cb4421",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/cooked-index.c",
      "new_id": "feaf9b5fe29d9df022fda2bb941106b37f25642c",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/cooked-index.c"
    }
  ]
}
