Skip to content
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

Optimize memory reallocations #11112

Merged

Conversation

razdoburdin
Copy link
Contributor

@razdoburdin razdoburdin commented Dec 17, 2024

This small PR optimizes memory allocations during CommonRowPartitioner creation. In the current realization the memory for RowSetCollection is allocated in each iteration. This PR allows to reuse the already allocated memory if possible.

The update is the most beneficial for datasets with high-number of rows.
Here are the perf gains for execution on single- and 2-socket machines, each socket has 56 cores CPU. HT is not used.
image

@razdoburdin razdoburdin marked this pull request as draft December 17, 2024 15:11
@razdoburdin razdoburdin marked this pull request as ready for review December 18, 2024 07:34
@razdoburdin
Copy link
Contributor Author

The CI failure looks not related to PRs content.
image

@trivialfis trivialfis merged commit 2d1c26b into dmlc:master Dec 19, 2024
57 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants