-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR optimizes `cudf.concat` when `axis=0` by not materializing `RangeIndex` objects present as index to the `Dataframe` objects. Partially addresses #9200, This is 1/2 of full optimizations. A follow-up PR to optimize `axis=1` will be opened as there are multiple large changes. Here is a benchmark: On `branch-21.10`: ```ipython IPython 7.27.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import cudf In [2]: df = cudf.DataFrame({'a':[1, 2, 3]*100}) In [3]: df2 = cudf.DataFrame({'a':[1, 2, 3]*100}, index=cudf.RangeIndex(300, 600)) In [4]: %timeit cudf.concat([df, df2]) 806 µs ± 8.02 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) ``` This PR: ```ipython IPython 7.27.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import cudf In [2]: df = cudf.DataFrame({'a':[1, 2, 3]*100}) In [3]: df2 = cudf.DataFrame({'a':[1, 2, 3]*100}, index=cudf.RangeIndex(300, 600)) In [4]: %timeit cudf.concat([df, df2]) 434 µs ± 4.35 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) ``` Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Ashwin Srinath (https://github.com/shwina) URL: #9222
- Loading branch information
1 parent
eb09d14
commit cc13060
Showing
6 changed files
with
127 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.