Files
git/builtin
René Scharfe 66e2adb8f6 describe: use prio_queue
Replace the use a list-based priority queue whose order is maintained by
commit_list_insert_by_date() with a prio_queue.  This avoids quadratic
worst-case complexity.  And in the somewhat contrived example of
describing the 4751 commits from v2.41.0 to v2.47.0 in one go (to get a
sizable chunk of describe work with minimal ref loading overhead) it's
significantly faster:

Benchmark 1: ./git_2.50.1 describe $(git rev-list v2.41.0..v2.47.0)
  Time (mean ± σ):      1.558 s ±  0.002 s    [User: 1.492 s, System: 0.051 s]
  Range (min … max):    1.557 s …  1.562 s    10 runs

Benchmark 2: ./git describe $(git rev-list v2.41.0..v2.47.0)
  Time (mean ± σ):      1.209 s ±  0.006 s    [User: 1.143 s, System: 0.051 s]
  Range (min … max):    1.201 s …  1.219 s    10 runs

Summary
  ./git describe $(git rev-list v2.41.0..v2.47.0) ran
    1.29 ± 0.01 times faster than ./git_2.50.1 describe $(git rev-list v2.41.0..v2.47.0)

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-03 09:13:27 -07:00
..
2025-05-27 13:59:09 -07:00
2025-07-16 09:42:28 -07:00
2025-07-01 14:46:38 -07:00
2025-07-01 14:46:37 -07:00
2024-12-13 07:33:36 -08:00
2025-07-15 15:18:18 -07:00
2025-07-15 15:18:18 -07:00
2025-07-01 14:46:38 -07:00
2025-07-15 15:18:18 -07:00
2025-07-01 10:28:48 -07:00
2025-01-28 13:02:22 -08:00
2025-08-03 09:13:27 -07:00
2025-07-01 14:46:38 -07:00
2025-07-16 09:42:27 -07:00
2025-07-01 14:46:38 -07:00
2024-12-18 10:44:30 -08:00
2025-07-01 14:46:37 -07:00
2025-07-01 14:46:37 -07:00
2024-12-18 10:44:31 -08:00
2025-07-15 15:18:18 -07:00
2025-07-01 14:46:37 -07:00
2025-05-08 12:36:32 -07:00
2025-07-01 14:46:38 -07:00
2025-07-15 15:18:18 -07:00
2025-08-01 11:27:14 -07:00
2025-02-04 09:51:41 -08:00
2025-07-01 14:46:37 -07:00
2025-03-29 01:04:40 -07:00
2025-07-01 14:46:38 -07:00
2025-06-30 14:30:31 -07:00
2025-07-01 14:46:38 -07:00
2025-07-01 14:46:38 -07:00
2024-12-18 10:44:30 -08:00
2025-01-28 13:02:22 -08:00