Skip to content

Conversation

@Matt711
Copy link
Contributor

@Matt711 Matt711 commented Jan 28, 2026

This commit adds 50 benchmark test cases for DataFrame reshaping operations (pivot, unstack) to establish baseline performance metrics and identify optimization opportunities.

Key features:

  • 50 total benchmarks covering pivot() and unstack() operations
  • Parametrized fixtures for clean, DRY design
  • Tests single-column and multi-column operations (1, 2, 4 value columns)
  • Data sizes: 1M-10M rows, cardinality: 100-2000
  • Supports both cuDF and pandas via CUDF_BENCHMARKS_USE_PANDAS=1

Key findings from benchmarks:

  • High cardinality: cuDF 3-25x faster (10M rows, card>1000)
  • Multi-level unstack: cuDF's best case (25-134x faster)

Description

Contributes to #20469

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@Matt711 Matt711 requested a review from a team as a code owner January 28, 2026 03:15
@Matt711 Matt711 requested review from mroeschke and vyasr January 28, 2026 03:15
@Matt711 Matt711 added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 28, 2026
@github-actions github-actions bot added Python Affects Python cuDF API. and removed improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 28, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jan 28, 2026
This commit adds 50 benchmark test cases for DataFrame reshaping
operations (pivot, unstack) to establish baseline performance metrics
and identify optimization opportunities.

Key features:
- 50 total benchmarks covering pivot() and unstack() operations
- Parametrized fixtures for clean, DRY design
- Tests single-column and multi-column operations (1, 2, 4 value columns)
- Data sizes: 1M-10M rows, cardinality: 100-2000
- Supports both cuDF and pandas via CUDF_BENCHMARKS_USE_PANDAS=1

Key findings from benchmarks:
- Multi-column pivot: pandas 2.4-3.3x faster (low-medium cardinality)
- High cardinality: cuDF 3-25x faster (10M rows, card>1000)
- Multi-level unstack: cuDF's best case (25-134x faster)

These benchmarks establish a baseline for tracking performance and
provide evidence for future optimization work targeting the
multi-column performance gap.

Co-authored-by: Claude Sonnet 4.5 <[email protected]>
@Matt711 Matt711 force-pushed the add-reshaping-benchmarks branch from b6782f2 to 2cac67e Compare January 28, 2026 03:17
@Matt711 Matt711 added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 28, 2026
@Matt711
Copy link
Contributor Author

Matt711 commented Jan 28, 2026

image
Details
(rapids) coder ➜ ~/cudf $ pytest python/cudf/benchmarks/API/bench_reshaping.py --benchmark-only
=================================================== test session starts ===================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/coder/cudf/python/cudf/benchmarks
configfile: pytest.ini
plugins: pytest_httpserver-1.1.3, anyio-4.12.1, cases-3.9.1, benchmark-5.2.3, timeout-2.4.0, rerunfailures-16.1, xdist-3.8.0, hypothesis-6.150.2, cov-7.0.0
collected 50 items                                                                                                        

python/cudf/benchmarks/API/bench_reshaping.py ..................................................                    [100%]


------------------------------------------------------------------------------------------------- benchmark: 50 tests --------------------------------------------------------------------------------------------------
Name (time in ms)                                      Min                 Max                Mean             StdDev              Median                IQR            Outliers       OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
bench_unstack[1M_card100-1col-last_level]           3.5752 (1.0)        5.1088 (1.07)       3.7132 (1.0)       0.1678 (1.0)        3.6652 (1.0)       0.1058 (1.0)         26;26  269.3072 (1.0)         254           1
bench_unstack[1M_card100-1col-first_level]          3.8111 (1.07)       4.7640 (1.0)        3.9943 (1.08)      0.1957 (1.17)       3.9303 (1.07)      0.1313 (1.24)        31;29  250.3548 (0.93)        229           1
bench_pivot[1M_card100-1col]                        4.6185 (1.29)       5.5274 (1.16)       5.1198 (1.38)      0.1860 (1.11)       5.0945 (1.39)      0.1264 (1.19)          2;2  195.3217 (0.73)         15           1
bench_unstack_multilevel[1M_card100]                5.3074 (1.48)       6.1145 (1.28)       5.5773 (1.50)      0.2060 (1.23)       5.5312 (1.51)      0.3228 (3.05)         37;0  179.2998 (0.67)        101           1
bench_unstack[1M_card100-2cols-last_level]          5.8872 (1.65)       7.1447 (1.50)       6.1539 (1.66)      0.2810 (1.68)       6.0445 (1.65)      0.2928 (2.77)        27;10  162.4983 (0.60)        157           1
bench_unstack[10M_card500-1col-last_level]          6.1510 (1.72)      54.8497 (11.51)      7.0058 (1.89)      4.2158 (25.13)      6.5333 (1.78)      0.6013 (5.68)          1;1  142.7380 (0.53)        132           1
bench_unstack[1M_card500-1col-last_level]           6.6445 (1.86)      63.9568 (13.43)      7.5568 (2.04)      4.8423 (28.86)      6.9468 (1.90)      0.4637 (4.38)         1;13  132.3310 (0.49)        139           1
bench_pivot_no_values[1M_card100-2cols]             6.6531 (1.86)       8.6658 (1.82)       7.0580 (1.90)      0.3511 (2.09)       6.9396 (1.89)      0.2439 (2.30)        19;15  141.6823 (0.53)        139           1
bench_unstack[1M_card100-2cols-first_level]         6.7152 (1.88)      72.0105 (15.12)      7.3991 (1.99)      5.7582 (34.32)      6.8739 (1.88)      0.1752 (1.66)          1;5  135.1523 (0.50)        128           1
bench_pivot[1M_card100-2cols]                       6.8189 (1.91)       8.2304 (1.73)       7.1335 (1.92)      0.2424 (1.44)       7.0809 (1.93)      0.1766 (1.67)        16;10  140.1834 (0.52)        119           1
bench_unstack[10M_card500-1col-first_level]         8.0172 (2.24)      56.8945 (11.94)      9.3283 (2.51)      6.4527 (38.46)      8.3153 (2.27)      0.5299 (5.01)          2;4  107.2005 (0.40)        110           1
bench_pivot[10M_card500-1col]                       8.6920 (2.43)      60.4010 (12.68)      9.7466 (2.62)      5.0171 (29.90)      9.1071 (2.48)      0.4894 (4.62)          1;9  102.5999 (0.38)        105           1
bench_unstack[1M_card500-1col-first_level]          8.8629 (2.48)      58.6843 (12.32)     10.1546 (2.73)      6.4395 (38.38)      9.1647 (2.50)      0.3802 (3.59)          2;6   98.4772 (0.37)        101           1
bench_pivot[1M_card500-1col]                        9.2422 (2.59)      62.0136 (13.02)     10.2489 (2.76)      5.4730 (32.62)      9.5587 (2.61)      0.3482 (3.29)         1;10   97.5712 (0.36)         92           1
bench_unstack[10M_card500-2cols-last_level]        10.5348 (2.95)      74.6420 (15.67)     11.9044 (3.21)      6.8279 (40.70)     11.0053 (3.00)      0.7156 (6.76)          1;4   84.0029 (0.31)         87           1
bench_unstack[1M_card500-2cols-last_level]         11.4683 (3.21)      64.0149 (13.44)     13.6016 (3.66)      8.0167 (47.78)     12.1823 (3.32)      0.9500 (8.98)          2;3   73.5208 (0.27)         78           1
bench_pivot_no_values[1M_card100-4cols]            11.6183 (3.25)      14.3474 (3.01)      12.2189 (3.29)      0.6115 (3.64)      11.9383 (3.26)      0.6949 (6.57)         13;3   81.8403 (0.30)         81           1
bench_unstack[1M_card1000-1col-last_level]         11.7253 (3.28)      69.1808 (14.52)     13.0748 (3.52)      6.4773 (38.61)     12.1174 (3.31)      0.3783 (3.57)         1;11   76.4828 (0.28)         78           1
bench_pivot[1M_card100-4cols]                      11.8220 (3.31)      67.3903 (14.15)     12.7945 (3.45)      6.1895 (36.89)     12.0363 (3.28)      0.2026 (1.91)          1;6   78.1587 (0.29)         80           1
bench_pivot[10M_card500-2cols]                     13.0179 (3.64)      16.7752 (3.52)      13.5584 (3.65)      0.5350 (3.19)      13.4199 (3.66)      0.3582 (3.38)          8;6   73.7548 (0.27)         69           1
bench_pivot_no_values[10M_card500-2cols]           13.1438 (3.68)      15.8453 (3.33)      13.6018 (3.66)      0.4778 (2.85)      13.4570 (3.67)      0.3002 (2.84)          6;6   73.5195 (0.27)         69           1
bench_unstack_multilevel[1M_card500]               13.8594 (3.88)      76.1795 (15.99)     15.4083 (4.15)      7.5775 (45.17)     14.2164 (3.88)      0.3834 (3.62)         1;10   64.9002 (0.24)         67           1
bench_pivot[1M_card500-2cols]                      14.0445 (3.93)      17.2779 (3.63)      14.8632 (4.00)      0.6651 (3.96)      14.6731 (4.00)      0.9957 (9.41)         15;1   67.2804 (0.25)         65           1
bench_pivot_no_values[1M_card500-2cols]            14.1599 (3.96)      79.9612 (16.78)     16.3435 (4.40)      9.8208 (58.54)     14.5027 (3.96)      0.5273 (4.98)          2;6   61.1864 (0.23)         68           1
bench_unstack[10M_card500-2cols-first_level]       14.2689 (3.99)      66.7061 (14.00)     16.5154 (4.45)      8.7491 (52.15)     14.8309 (4.05)      0.9085 (8.58)          2;2   60.5496 (0.22)         65           1
bench_unstack[1M_card500-2cols-first_level]        15.8604 (4.44)      66.5662 (13.97)     18.7880 (5.06)     10.2103 (60.86)     16.4292 (4.48)      0.5685 (5.37)          3;5   53.2255 (0.20)         60           1
bench_pivot[1M_card1000-1col]                      15.9600 (4.46)      69.3194 (14.55)     18.4660 (4.97)      7.3686 (43.92)     16.7325 (4.57)      1.2000 (11.34)         3;6   54.1536 (0.20)         56           1
bench_unstack[1M_card1000-1col-first_level]        16.2753 (4.55)      91.5966 (19.23)     22.0845 (5.95)     15.8206 (94.30)     17.3530 (4.73)      1.8637 (17.61)         4;4   45.2806 (0.17)         53           1
bench_unstack[10M_card2000-1col-last_level]        18.6523 (5.22)      74.2486 (15.59)     22.7040 (6.11)     11.9157 (71.02)     19.6289 (5.36)      0.6035 (5.70)          3;7   44.0450 (0.16)         48           1
bench_unstack[1M_card1000-2cols-last_level]        21.2050 (5.93)      75.6987 (15.89)     24.1054 (6.49)     10.5328 (62.78)     21.8136 (5.95)      0.5935 (5.61)          2;3   41.4845 (0.15)         45           1
bench_pivot[10M_card500-4cols]                     21.9534 (6.14)      89.5005 (18.79)     25.7975 (6.95)     13.4389 (80.10)     22.6355 (6.18)      0.8851 (8.36)          2;4   38.7635 (0.14)         42           1
bench_pivot_no_values[10M_card500-4cols]           22.2693 (6.23)      83.1908 (17.46)     24.6441 (6.64)      9.3967 (56.01)     23.0932 (6.30)      0.8228 (7.77)          1;3   40.5777 (0.15)         41           1
bench_unstack_multilevel[1M_card1000]              23.9813 (6.71)     112.6629 (23.65)     46.2081 (12.44)    22.1251 (131.88)    54.4726 (14.86)    39.8507 (376.50)        6;0   21.6412 (0.08)         41           1
bench_pivot[1M_card500-4cols]                      24.1341 (6.75)      90.3898 (18.97)     28.4222 (7.65)     13.8062 (82.29)     25.0400 (6.83)      1.7619 (16.65)         2;2   35.1838 (0.13)         40           1
bench_pivot_no_values[1M_card500-4cols]            24.3545 (6.81)      96.8256 (20.32)     29.0124 (7.81)     13.8606 (82.62)     25.7391 (7.02)      1.4544 (13.74)         2;2   34.4680 (0.13)         39           1
bench_pivot[10M_card2000-1col]                     24.9199 (6.97)      87.1896 (18.30)     29.0693 (7.83)     13.0960 (78.06)     25.7377 (7.02)      0.7770 (7.34)          2;7   34.4005 (0.13)         36           1
bench_pivot[1M_card1000-2cols]                     25.2919 (7.07)      93.1989 (19.56)     30.2845 (8.16)     14.4255 (85.98)     26.3045 (7.18)      2.0989 (19.83)         2;2   33.0202 (0.12)         35           1
bench_pivot_no_values[1M_card1000-2cols]           25.6011 (7.16)      88.6381 (18.61)     30.2506 (8.15)     13.6322 (81.25)     26.8063 (7.31)      1.7344 (16.39)         2;3   33.0572 (0.12)         36           1
bench_unstack[10M_card2000-1col-first_level]       27.6847 (7.74)      87.0488 (18.27)     37.5184 (10.10)    18.3659 (109.47)    30.1949 (8.24)      3.9985 (37.78)         4;4   26.6536 (0.10)         29           1
bench_unstack_multilevel[10M_card500]              28.2776 (7.91)      30.9919 (6.51)      29.4620 (7.93)      0.7245 (4.32)      29.2532 (7.98)      0.7410 (7.00)         12;1   33.9420 (0.13)         33           1
bench_unstack[1M_card1000-2cols-first_level]       30.2967 (8.47)      85.4429 (17.94)     38.8084 (10.45)    17.0182 (101.44)    32.4398 (8.85)      2.6790 (25.31)         4;4   25.7676 (0.10)         31           1
bench_unstack[10M_card2000-2cols-last_level]       34.6467 (9.69)      89.1669 (18.72)     41.8276 (11.26)    16.8307 (100.32)    35.9340 (9.80)      2.1894 (20.68)         3;4   23.9077 (0.09)         27           1
bench_pivot_no_values[10M_card2000-2cols]          39.9828 (11.18)     93.6527 (19.66)     46.1192 (12.42)    14.3086 (85.29)     41.5582 (11.34)     1.4496 (13.70)         2;4   21.6829 (0.08)         23           1
bench_pivot[10M_card2000-2cols]                    40.0449 (11.20)     99.3806 (20.86)     47.5639 (12.81)    17.4056 (103.74)    41.1826 (11.24)     1.5211 (14.37)         3;3   21.0244 (0.08)         24           1
bench_pivot[1M_card1000-4cols]                     44.8016 (12.53)    118.3814 (24.85)     52.5208 (14.14)    18.1630 (108.26)    46.2598 (12.62)     3.7359 (35.30)         2;2   19.0401 (0.07)         22           1
bench_pivot_no_values[1M_card1000-4cols]           45.2053 (12.64)    101.3197 (21.27)     51.4768 (13.86)    15.7824 (94.07)     46.0699 (12.57)     2.5128 (23.74)         2;2   19.4262 (0.07)         21           1
bench_unstack[10M_card2000-2cols-first_level]      53.4848 (14.96)    124.3233 (26.10)     72.0718 (19.41)    24.3811 (145.32)    58.6368 (16.00)    47.0907 (444.90)        5;0   13.8751 (0.05)         18           1
bench_pivot_no_values[10M_card2000-4cols]          70.5824 (19.74)    115.9281 (24.33)     79.6968 (21.46)    16.0526 (95.68)     74.1547 (20.23)     1.9890 (18.79)         1;1   12.5476 (0.05)          7           1
bench_pivot[10M_card2000-4cols]                    70.9301 (19.84)    134.4149 (28.21)     86.6502 (23.34)    23.6750 (141.11)    75.4357 (20.58)     9.0678 (85.67)         3;3   11.5407 (0.04)         14           1
bench_unstack_multilevel[10M_card2000]            357.0587 (99.87)    573.0074 (120.28)   503.7885 (135.67)   58.8612 (350.84)   519.5250 (141.75)   23.6360 (223.30)        2;2    1.9850 (0.01)         10           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
============================================== 50 passed in 73.96s (0:01:13) ==============================================
(rapids) coder ➜ ~/cudf $ CUDF_BENCHMARKS_USE_PANDAS=1 pytest python/cudf/benchmarks/API/bench_reshaping.py --benchmark-only
=================================================== test session starts ===================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/coder/cudf/python/cudf/benchmarks
configfile: pytest.ini
plugins: pytest_httpserver-1.1.3, anyio-4.12.1, cases-3.9.1, benchmark-5.2.3, timeout-2.4.0, rerunfailures-16.1, xdist-3.8.0, hypothesis-6.150.2, cov-7.0.0
collected 50 items                                                                                                        

python/cudf/benchmarks/API/bench_reshaping.py ..................................................                    [100%]


------------------------------------------------------------------------------------------------------------------- benchmark: 50 tests -------------------------------------------------------------------------------------------------------------------
Name (time in us)                                            Min                       Max                      Mean                 StdDev                    Median                     IQR            Outliers         OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
bench_unstack[1M_card100-1col-last_level]               672.0126 (1.0)          1,112.6883 (1.07)           710.8297 (1.0)          53.1017 (1.48)           679.8133 (1.0)           53.6973 (1.94)       167;79  1,406.8067 (1.0)        1236           1
bench_unstack[1M_card100-2cols-last_level]              690.1287 (1.03)         1,044.7688 (1.0)            713.6342 (1.00)         35.8137 (1.0)            696.7075 (1.02)          27.7413 (1.0)        135;77  1,401.2781 (1.00)       1117           1
bench_unstack[1M_card100-1col-first_level]            1,065.8912 (1.59)         1,550.1026 (1.48)         1,141.2272 (1.61)         89.0917 (2.49)         1,093.7341 (1.61)         108.4665 (3.91)       124;32    876.2497 (0.62)        737           1
bench_unstack[1M_card100-2cols-first_level]           1,084.5885 (1.61)         1,501.6720 (1.44)         1,172.6060 (1.65)         89.7956 (2.51)         1,146.5754 (1.69)         113.5045 (4.09)       113;26    852.8014 (0.61)        673           1
bench_pivot[1M_card100-1col]                          1,295.8515 (1.93)         2,257.1888 (2.16)         1,506.7961 (2.12)        322.3095 (9.00)         1,366.0602 (2.01)         126.9099 (4.57)          9;9    663.6598 (0.47)         47           1
bench_pivot[1M_card100-2cols]                         1,688.1283 (2.51)         2,107.9816 (2.02)         1,753.4651 (2.47)         77.7068 (2.17)         1,717.3048 (2.53)          89.2375 (3.22)        66;23    570.2993 (0.41)        468           1
bench_pivot[1M_card100-4cols]                         1,710.0833 (2.54)         4,662.6888 (4.46)         1,831.5192 (2.58)        193.8576 (5.41)         1,773.6685 (2.61)         183.9851 (6.63)         38;7    545.9948 (0.39)        421           1
bench_pivot_no_values[1M_card100-2cols]               1,774.7115 (2.64)         3,365.5204 (3.22)         1,939.0997 (2.73)        158.1669 (4.42)         1,908.9030 (2.81)         208.3071 (7.51)         71;6    515.7032 (0.37)        408           1
bench_pivot_no_values[1M_card100-4cols]               1,795.4223 (2.67)         5,985.2134 (5.73)         1,949.5840 (2.74)        253.6228 (7.08)         1,863.1034 (2.74)         194.0955 (7.00)        57;33    512.9299 (0.36)        451           1
bench_unstack[10M_card500-1col-last_level]            6,014.3508 (8.95)        10,221.4180 (9.78)         6,545.7155 (9.21)        525.8866 (14.68)        6,401.2893 (9.42)         462.7206 (16.68)        15;5    152.7717 (0.11)        149           1
bench_unstack[10M_card500-2cols-last_level]           6,276.9596 (9.34)         8,153.1517 (7.80)         6,674.8231 (9.39)        403.8592 (11.28)        6,541.4496 (9.62)         510.8640 (18.42)        24;4    149.8167 (0.11)        138           1
bench_unstack[1M_card500-1col-last_level]             6,284.0413 (9.35)         7,936.3864 (7.60)         6,640.5571 (9.34)        349.4041 (9.76)         6,520.4408 (9.59)         373.2876 (13.46)        26;8    150.5898 (0.11)        129           1
bench_unstack[1M_card500-2cols-last_level]            6,671.5702 (9.93)         8,945.8674 (8.56)         6,958.3196 (9.79)        301.9007 (8.43)         6,886.1730 (10.13)        276.8920 (9.98)         15;7    143.7129 (0.10)        113           1
bench_pivot[10M_card500-1col]                         8,338.6749 (12.41)        9,819.9826 (9.40)         8,578.3496 (12.07)       270.8041 (7.56)         8,498.3520 (12.50)        265.5224 (9.57)         15;8    116.5725 (0.08)        107           1
bench_pivot[1M_card500-1col]                          8,590.2978 (12.78)       10,045.7128 (9.62)         8,940.5948 (12.58)       359.6867 (10.04)        8,808.8093 (12.96)        444.0565 (16.01)        19;2    111.8494 (0.08)        106           1
bench_pivot[10M_card500-2cols]                        9,233.2549 (13.74)       11,739.3360 (11.24)        9,675.9672 (13.61)       536.7759 (14.99)        9,468.3981 (13.93)        380.3782 (13.71)       16;15    103.3488 (0.07)         96           1
bench_pivot[1M_card500-2cols]                         9,473.6516 (14.10)       14,555.2568 (13.93)        9,995.3633 (14.06)       688.6150 (19.23)        9,816.9753 (14.44)        547.0458 (19.72)         8;6    100.0464 (0.07)         94           1
bench_pivot[10M_card500-4cols]                        9,605.8790 (14.29)       11,965.1407 (11.45)       10,289.7451 (14.48)       590.6524 (16.49)       10,017.9594 (14.74)        733.6540 (26.45)        23;3     97.1841 (0.07)         89           1
bench_pivot_no_values[10M_card500-2cols]             10,397.6689 (15.47)       12,586.5620 (12.05)       10,919.1683 (15.36)       610.9134 (17.06)       10,665.0600 (15.69)        861.2797 (31.05)        16;0     91.5821 (0.07)         82           1
bench_pivot_no_values[1M_card500-2cols]              10,697.2642 (15.92)       12,990.7355 (12.43)       11,137.7111 (15.67)       410.6184 (11.47)       11,050.9861 (16.26)        433.4059 (15.62)        15;4     89.7851 (0.06)         80           1
bench_pivot[1M_card500-4cols]                        10,748.6751 (15.99)       15,197.5118 (14.55)       11,527.6033 (16.22)       860.5712 (24.03)       11,166.1311 (16.43)        829.6808 (29.91)        10;3     86.7483 (0.06)         71           1
bench_pivot_no_values[10M_card500-4cols]             10,775.2997 (16.03)       12,525.3964 (11.99)       11,135.1902 (15.67)       377.6682 (10.55)       10,989.2245 (16.17)        525.8960 (18.96)        12;1     89.8054 (0.06)         69           1
bench_pivot_no_values[1M_card500-4cols]              11,802.0996 (17.56)       15,218.6956 (14.57)       12,412.8199 (17.46)       699.4604 (19.53)       12,166.0084 (17.90)        718.6192 (25.90)        12;6     80.5619 (0.06)         71           1
bench_unstack_multilevel[1M_card100]                 19,194.2230 (28.56)       21,744.6238 (20.81)       19,685.3200 (27.69)       478.5819 (13.36)       19,562.2817 (28.78)        423.2065 (15.26)         9;2     50.7993 (0.04)         43           1
bench_unstack[1M_card500-1col-first_level]           20,072.7955 (29.87)       22,791.7582 (21.82)       20,692.5182 (29.11)       626.5607 (17.50)       20,591.2720 (30.29)        676.7805 (24.40)         4;2     48.3266 (0.03)         39           1
bench_unstack[10M_card500-1col-first_level]          20,214.4701 (30.08)       24,216.2161 (23.18)       21,116.4714 (29.71)       804.0753 (22.45)       21,019.1924 (30.92)        781.1850 (28.16)        11;1     47.3564 (0.03)         39           1
bench_unstack[10M_card500-2cols-first_level]         20,542.3646 (30.57)       26,454.4077 (25.32)       21,869.6070 (30.77)     1,208.0602 (33.73)       21,671.1452 (31.88)      1,469.5581 (52.97)        13;1     45.7256 (0.03)         40           1
bench_unstack[1M_card1000-1col-last_level]           20,887.9113 (31.08)       24,870.3081 (23.80)       22,066.7737 (31.04)     1,185.2495 (33.09)       21,640.4423 (31.83)      1,339.3522 (48.28)        10;1     45.3170 (0.03)         41           1
bench_unstack[1M_card500-2cols-first_level]          20,940.9986 (31.16)       23,951.7614 (22.93)       22,098.0593 (31.09)       906.7981 (25.32)       21,756.3128 (32.00)      1,375.7646 (49.59)        11;0     45.2528 (0.03)         34           1
bench_unstack[1M_card1000-2cols-last_level]          22,343.3413 (33.25)       26,661.2601 (25.52)       23,449.3611 (32.99)     1,337.6828 (37.35)       22,793.6506 (33.53)      1,337.0616 (48.20)         6;3     42.6451 (0.03)         35           1
bench_pivot[1M_card1000-1col]                        27,895.3351 (41.51)       32,125.5922 (30.75)       29,111.9674 (40.95)     1,178.2832 (32.90)       28,644.8002 (42.14)        955.6250 (34.45)         7;6     34.3501 (0.02)         33           1
bench_pivot[1M_card1000-2cols]                       32,287.4077 (48.05)       37,815.0754 (36.19)       34,388.5433 (48.38)     1,392.2690 (38.88)       34,266.8956 (50.41)      2,051.1653 (73.94)         6;0     29.0795 (0.02)         26           1
bench_pivot_no_values[1M_card1000-2cols]             35,384.4389 (52.65)       43,120.5649 (41.27)       37,856.0557 (53.26)     2,349.1362 (65.59)       36,672.7412 (53.95)      3,398.0645 (122.49)        6;0     26.4159 (0.02)         27           1
bench_pivot[1M_card1000-4cols]                       41,146.8185 (61.23)       47,861.4401 (45.81)       43,287.8629 (60.90)     2,048.4750 (57.20)       42,573.8469 (62.63)      2,378.9266 (85.75)         7;1     23.1012 (0.02)         24           1
bench_pivot_no_values[1M_card1000-4cols]             44,726.9287 (66.56)       48,205.7147 (46.14)       45,870.8518 (64.53)       778.6671 (21.74)       45,603.7950 (67.08)        587.6180 (21.18)         5;3     21.8003 (0.02)         23           1
bench_unstack[1M_card1000-1col-first_level]          76,894.0058 (114.42)      97,547.3560 (93.37)       83,391.9380 (117.32)    6,129.1661 (171.14)      81,318.7836 (119.62)     7,668.6731 (276.44)        4;0     11.9916 (0.01)         12           1
bench_unstack[1M_card1000-2cols-first_level]         81,108.1752 (120.69)     107,400.2665 (102.80)      89,969.2392 (126.57)    9,278.9569 (259.09)      87,773.7002 (129.11)    11,088.7941 (399.72)        2;0     11.1149 (0.01)         10           1
bench_unstack[10M_card2000-1col-last_level]         114,278.7319 (170.05)     118,907.5541 (113.81)     116,505.9445 (163.90)    1,458.9467 (40.74)      116,380.7344 (171.20)     2,022.0438 (72.89)         4;0      8.5833 (0.01)          9           1
bench_unstack[10M_card2000-2cols-last_level]        126,546.2600 (188.31)     134,635.0275 (128.87)     129,746.9840 (182.53)    2,589.9100 (72.32)      128,999.1159 (189.76)     3,319.5587 (119.66)        2;0      7.7073 (0.01)          8           1
bench_pivot[10M_card2000-1col]                      186,281.6475 (277.20)     211,811.9840 (202.74)     192,605.3191 (270.96)    9,552.9747 (266.74)     189,720.3028 (279.08)     2,943.3947 (106.10)        1;1      5.1920 (0.00)          6           1
bench_pivot[10M_card2000-2cols]                     216,352.1312 (321.95)     231,175.9852 (221.27)     222,329.7562 (312.77)    7,055.0370 (196.99)     218,155.9168 (320.91)    12,377.0577 (446.16)        1;0      4.4978 (0.00)          5           1
bench_pivot_no_values[10M_card2000-2cols]           251,546.5077 (374.32)     264,727.1026 (253.38)     257,493.1297 (362.24)    4,772.6532 (133.26)     257,635.9995 (378.98)     4,930.4315 (177.73)        2;0      3.8836 (0.00)          5           1
bench_pivot[10M_card2000-4cols]                     277,577.1525 (413.05)     285,202.5889 (272.98)     281,231.3009 (395.64)    3,107.1718 (86.76)      280,696.0605 (412.90)     5,120.6793 (184.59)        2;0      3.5558 (0.00)          5           1
bench_pivot_no_values[10M_card2000-4cols]           306,096.5016 (455.49)     331,646.8168 (317.44)     313,206.1366 (440.62)   10,476.9257 (292.54)     310,103.3829 (456.16)     8,754.2594 (315.57)        1;1      3.1928 (0.00)          5           1
bench_unstack_multilevel[1M_card500]                330,861.2891 (492.34)     377,570.6179 (361.39)     346,497.4888 (487.45)   18,627.6247 (520.13)     341,643.7283 (502.56)    22,196.7492 (800.13)        1;0      2.8860 (0.00)          5           1
bench_unstack[10M_card2000-1col-first_level]        601,537.5536 (895.13)     632,969.3254 (605.85)     620,470.7395 (872.88)   11,663.3055 (325.67)     623,352.3730 (916.95)    11,943.2071 (430.52)        2;0      1.6117 (0.00)          5           1
bench_unstack[10M_card2000-2cols-first_level]       609,875.0848 (907.54)     699,229.7005 (669.27)     639,234.5123 (899.28)   34,591.2442 (965.87)     629,620.7439 (926.17)    25,924.7995 (934.52)        1;1      1.5644 (0.00)          5           1
bench_unstack_multilevel[1M_card1000]               781,079.3128 (>1000.0)    855,889.4452 (819.21)     812,856.4056 (>1000.0)  29,725.4083 (830.00)     799,971.9083 (>1000.0)   42,548.2192 (>1000.0)       2;0      1.2302 (0.00)          5           1
bench_unstack_multilevel[10M_card500]             3,157,023.2958 (>1000.0)  3,213,885.8978 (>1000.0)  3,179,225.6627 (>1000.0)  24,058.8822 (671.78)   3,176,087.9923 (>1000.0)   39,488.8530 (>1000.0)       1;0      0.3145 (0.00)          5           1
bench_unstack_multilevel[10M_card2000]            8,726,243.7064 (>1000.0)  8,877,224.4323 (>1000.0)  8,796,572.4252 (>1000.0)  62,706.5640 (>1000.0)  8,778,413.7670 (>1000.0)  104,128.8194 (>1000.0)       2;0      0.1137 (0.00)          5           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
============================================= 50 passed in 209.08s (0:03:29) ==============================================

GPU: Tesla V100
CPU: Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz

Comment on lines +13 to +17
(1_000_000, 100),
(1_000_000, 500),
(1_000_000, 1000),
(10_000_000, 500),
(10_000_000, 2000),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use NUM_ROWS from config? Ideally we want these benchmarks to run quick when running them locally (and CI) for correctness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants