-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Final optimization batch (#15): use memory pools #990
Final optimization batch (#15): use memory pools #990
Conversation
76bc732
to
7133f0e
Compare
16f33dc
to
be483b7
Compare
a9cbc1d
to
c9ada83
Compare
be483b7
to
17aa0a7
Compare
/submit |
Submitted as pull.990.git.1627044897.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
User |
User |
This branch is now known as |
This patch series was integrated into seen via git@0626b7e. |
User |
On the Git mailing list, Derrick Stolee wrote (reply to this):
|
This patch series was integrated into seen via git@9e55ef9. |
This patch series was integrated into seen via git@5ff447e. |
This patch series was integrated into seen via git@0f1c736. |
This patch series was integrated into seen via git@8ae575a. |
There was a status update in the "New Topics" section about the branch Final batch for "merge -sort" optimization. |
This patch series was integrated into seen via git@2b17e87. |
This patch series was integrated into seen via git@c010d20. |
This patch series was integrated into seen via git@8f61a4f. |
This patch series was integrated into seen via git@3feae66. |
On the Git mailing list, Elijah Newren wrote (reply to this):
|
17aa0a7
to
fda885d
Compare
This patch series was integrated into seen via git@900f67b. |
This patch series was integrated into next via git@87fc290. |
This patch series was integrated into seen via git@4a664fc. |
This patch series was integrated into seen via git@ee26625. |
This patch series was integrated into seen via git@93f90db. |
There was a status update in the "Cooking" section about the branch Final batch for "merge -sort" optimization. Will cook in 'next'. |
This patch series was integrated into seen via git@29239a3. |
This patch series was integrated into seen via git@d4bf464. |
There was a status update in the "Cooking" section about the branch Final batch for "merge -sort" optimization. Will cook in 'next'. |
This patch series was integrated into seen via git@c74fc01. |
This patch series was integrated into seen via git@6b0687d. |
There was a status update in the "Cooking" section about the branch Final batch for "merge -sort" optimization. Will cook in 'next'. |
This patch series was integrated into seen via git@87fc290. |
This patch series was integrated into seen via git@1c090c6. |
This patch series was integrated into seen via git@5bf9003. |
There was a status update in the "Cooking" section about the branch Final batch for "merge -sort" optimization. Will cook in 'next'. |
This patch series was integrated into seen via git@b6659ff. |
This patch series was integrated into seen via git@51fcba1. |
There was a status update in the "Cooking" section about the branch Final batch for "merge -sort" optimization. Will cook in 'next'. |
This patch series was integrated into seen via git@256d56e. |
This patch series was integrated into next via git@d22a850. |
There was a status update in the "Cooking" section about the branch Originally merged to 'next' on 2021-08-04 Final batch for "merge -sort" optimization. Will merge to 'master'. |
This patch series was integrated into seen via git@08ac213. |
This patch series was integrated into next via git@08ac213. |
This patch series was integrated into master via git@08ac213. |
Closed via 08ac213. |
This series textually depends on en/ort-perf-batch-14, but the ideas are
orthogonal to it and orthogonal to previous series. It can be reviewed
independently.
Changes since v1, addressing Eric's feedback:
Changes since v2, addressing Peff's feedback:
Changes since v3, as per Peff's feedback:
Changes since v4:
=== Basic Optimization idea ===
In this series, I make use of memory pools to get faster allocations and
deallocations for many data structures that tend to all be deallocated
at the same time anyway.
=== Results ===
For the testcases mentioned in commit 557ac03 ("merge-ort: begin
performance work; instrument with trace2_region_* calls", 2020-10-28),
the changes in just this series improves the performance as follows:
As a reminder, before any merge-ort/diffcore-rename performance work,
the performance results we started with were:
=== Overall Results across all optimization work ===
This is my final prepared optimization series. It might be worth
reviewing how my optimizations fared overall, comparing the original
merge-recursive timings with three things: how much merge-recursive
improved (as a side-effect of optimizing merge-ort), how much
improvement we would have gotten from a hypothetical infinite
parallelization of rename detection, and what I achieved at the end with
merge-ort:
And, for partial clone users:
=== Caveat ===
It may be worth noting, though, that my optimization numbers above for
merge-ort use
test-tool fast-rebase
.git rebase -s ort
on thethree testcases above is 5-20 times slower (taking 3.835s, 6.798s, and
1.235s, respectively). At this point, any further optimization work
should go into making a faster full-featured rebase by copying the
ideas from fast-rebase: avoid unnecessary process forking, avoid
updating the index and working copy until either the rebase is
finished or you hit a conflict (and don't write rebase metadata to
disk until that point either), get rid of the glacially slow revision
walking of the upstream side of history (nuke can_fast_forward(), make
--reapply-cherry-picks the default) or at least don't revision walk so
many times (multiple calls to get_merge_bases in can_fast_forward()
plus a is_linear_history() walk, checking for upstream cherry-picks,
probably more), turn off per-commit hooks that probably should have
never been on anyway, etc.
cc: Jeff King peff@peff.net
cc: Eric Sunshine sunshine@sunshineco.com
cc: Elijah Newren newren@gmail.com
cc: Derrick Stolee stolee@gmail.com
cc: Ævar Arnfjörð Bjarmason avarab@gmail.com