Commit b07dd90
merge-recursive: optimize time complexity for process_renames
Avoid O(n^2) complexity in `process_renames()` when building a sorted
`string_list` by constructing it unsorted and sorting it afterward,
reducing the complexity to O(n log n).
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent e2067b4 commit b07dd90
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2758 | 2758 | | |
2759 | 2759 | | |
2760 | 2760 | | |
2761 | | - | |
2762 | | - | |
2763 | | - | |
2764 | | - | |
2765 | | - | |
2766 | | - | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
2767 | 2764 | | |
2768 | 2765 | | |
2769 | 2766 | | |
2770 | | - | |
| 2767 | + | |
2771 | 2768 | | |
2772 | 2769 | | |
2773 | 2770 | | |
2774 | 2771 | | |
2775 | | - | |
| 2772 | + | |
2776 | 2773 | | |
2777 | 2774 | | |
| 2775 | + | |
| 2776 | + | |
2778 | 2777 | | |
2779 | 2778 | | |
2780 | 2779 | | |
| |||
0 commit comments