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

perf(rename): avoid unnecessary rewrites and dereferencing in rename #9641

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Jul 19, 2024

Addresses rename performance from #9111 with wide tables by removing some unnecessary rewriting and dereferencing. Neither of these are necessary, because we already have all columns fully bound, we are simply giving them new names.

@cpcloud cpcloud added ux User experience related issues performance Issues related to ibis's performance labels Jul 19, 2024
@cpcloud cpcloud requested a review from ncclementi July 19, 2024 19:18
@cpcloud cpcloud added the internals Issues or PRs related to ibis's internal APIs label Jul 19, 2024
@cpcloud
Copy link
Member Author

cpcloud commented Jul 19, 2024

Benchmarks look pretty nice, about a 3-5x speedup across the board:

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-ALL_CAPS]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                   Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-ALL_CAPS] (0001_89eec7d)     1.8767 (3.37)     2.1312 (2.14)     2.0447 (3.25)     0.0222 (1.0)      2.0450 (3.24)     0.0190 (1.0)         66;28    489.0796 (0.31)        469           1
test_wide_rename[10-ALL_CAPS] (NOW)              0.5563 (1.0)      0.9977 (1.0)      0.6284 (1.0)      0.0259 (1.17)     0.6320 (1.0)      0.0203 (1.07)      326;175  1,591.3342 (1.0)        1354           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------- benchmark 'test_wide_rename[10-format_string]': 2 tests ------------------------------------------------------------------------------
Name (time in ms)                                        Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-format_string] (0001_89eec7d)     1.7572 (3.48)     2.0029 (2.07)     1.9278 (3.45)     0.0433 (1.52)     1.9354 (3.44)     0.0223 (1.0)         75;63    518.7392 (0.29)        483           1
test_wide_rename[10-format_string] (NOW)              0.5048 (1.0)      0.9676 (1.0)      0.5593 (1.0)      0.0285 (1.0)      0.5629 (1.0)      0.0371 (1.67)        343;5  1,787.8089 (1.0)        1056           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-function]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                   Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-function] (0001_89eec7d)     1.7657 (3.65)     2.1460 (3.02)     1.9359 (3.57)     0.0414 (2.26)     1.9414 (3.58)     0.0240 (1.00)        57;49    516.5647 (0.28)        479           1
test_wide_rename[10-function] (NOW)              0.4844 (1.0)      0.7116 (1.0)      0.5421 (1.0)      0.0183 (1.0)      0.5428 (1.0)      0.0239 (1.0)        440;18  1,844.8197 (1.0)        1536           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-snake_case]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                     Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-snake_case] (0001_89eec7d)     1.2719 (4.14)     1.6519 (3.90)     1.3945 (4.04)     0.0446 (3.25)     1.4023 (4.06)     0.0310 (1.92)      146;112    717.1096 (0.25)        654           1
test_wide_rename[10-snake_case] (NOW)              0.3073 (1.0)      0.4232 (1.0)      0.3448 (1.0)      0.0137 (1.0)      0.3450 (1.0)      0.0161 (1.0)        310;62  2,899.9385 (1.0)        1431           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-ALL_CAPS]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                     Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-ALL_CAPS] (0001_89eec7d)     17.8616 (3.31)     59.4448 (9.47)     19.6762 (3.38)     5.5266 (40.73)    19.0841 (3.25)     0.3378 (3.31)          1;7   50.8228 (0.30)         54           1
test_wide_rename[100-ALL_CAPS] (NOW)               5.3937 (1.0)       6.2787 (1.0)       5.8291 (1.0)      0.1357 (1.0)       5.8759 (1.0)      0.1019 (1.0)         34;23  171.5544 (1.0)         168           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------- benchmark 'test_wide_rename[100-format_string]': 2 tests ------------------------------------------------------------------------------
Name (time in ms)                                          Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-format_string] (0001_89eec7d)     17.0282 (3.70)     18.4851 (3.39)     18.0057 (3.62)     0.3609 (3.92)     18.1151 (3.65)     0.2577 (3.94)         13;7   55.5380 (0.28)         54           1
test_wide_rename[100-format_string] (NOW)               4.6046 (1.0)       5.4471 (1.0)       4.9682 (1.0)      0.0921 (1.0)       4.9626 (1.0)      0.0654 (1.0)         29;21  201.2802 (1.0)         197           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-function]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                     Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-function] (0001_89eec7d)     17.0621 (3.87)     18.3568 (3.43)     18.0426 (3.75)     0.3021 (1.88)     18.1539 (3.74)     0.2611 (1.20)         11;7   55.4244 (0.27)         53           1
test_wide_rename[100-function] (NOW)               4.4098 (1.0)       5.3514 (1.0)       4.8095 (1.0)      0.1605 (1.0)       4.8482 (1.0)      0.2181 (1.0)          56;1  207.9219 (1.0)         198           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-snake_case]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                       Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-snake_case] (0001_89eec7d)     12.0776 (4.68)     14.1634 (4.58)     12.9391 (4.60)     0.2891 (2.77)     12.8905 (4.55)     0.2124 (1.61)         13;7   77.2851 (0.22)         69           1
test_wide_rename[100-snake_case] (NOW)               2.5785 (1.0)       3.0909 (1.0)       2.8098 (1.0)      0.1045 (1.0)       2.8301 (1.0)      0.1317 (1.0)         118;1  355.8950 (1.0)         331           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-ALL_CAPS]': 2 tests --------------------------------------------------------------------------------
Name (time in ms)                                       Min                 Max                Mean             StdDev              Median               IQR            Outliers      OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-ALL_CAPS] (0001_89eec7d)     183.1259 (3.16)     233.7253 (2.40)     195.4440 (3.18)     18.9086 (2.03)     189.2636 (3.19)     1.7250 (1.87)          1;2   5.1166 (0.31)          6           1
test_wide_rename[1000-ALL_CAPS] (NOW)               57.9540 (1.0)       97.5847 (1.0)       61.4656 (1.0)       9.3365 (1.0)       59.2560 (1.0)      0.9200 (1.0)           1;1  16.2693 (1.0)          17           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-format_string]': 2 tests ---------------------------------------------------------------------------------
Name (time in ms)                                            Min                 Max                Mean             StdDev              Median                IQR            Outliers      OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-format_string] (0001_89eec7d)     180.1905 (3.77)     222.5892 (2.56)     194.5335 (3.78)     20.9918 (2.50)     181.3335 (3.62)     39.5342 (28.25)         2;0   5.1405 (0.26)          6           1
test_wide_rename[1000-format_string] (NOW)               47.8296 (1.0)       86.9441 (1.0)       51.5157 (1.0)       8.3838 (1.0)       50.1126 (1.0)       1.3992 (1.0)           1;1  19.4115 (1.0)          20           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-function]': 2 tests --------------------------------------------------------------------------------
Name (time in ms)                                       Min                 Max                Mean             StdDev              Median               IQR            Outliers      OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-function] (0001_89eec7d)     174.4149 (3.74)     221.2693 (2.51)     184.4590 (3.65)     18.1436 (2.08)     177.3477 (3.61)     4.5231 (2.51)          1;1   5.4213 (0.27)          6           1
test_wide_rename[1000-function] (NOW)               46.6893 (1.0)       88.1984 (1.0)       50.4871 (1.0)       8.7088 (1.0)       49.1570 (1.0)      1.8031 (1.0)           1;1  19.8070 (1.0)          21           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-snake_case]': 2 tests --------------------------------------------------------------------------------
Name (time in ms)                                         Min                 Max                Mean             StdDev              Median               IQR            Outliers      OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-snake_case] (0001_89eec7d)     123.2789 (4.73)     165.9107 (2.31)     128.9864 (4.56)     13.8710 (1.83)     124.2309 (4.61)     1.6305 (1.81)          1;1   7.7528 (0.22)          9           1
test_wide_rename[1000-snake_case] (NOW)               26.0795 (1.0)       71.7275 (1.0)       28.2622 (1.0)       7.5821 (1.0)       26.9742 (1.0)      0.8988 (1.0)           1;1  35.3829 (1.0)          35           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-ALL_CAPS]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                       Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-ALL_CAPS] (0001_89eec7d)     1.9762 (3.19)     2.0409 (3.21)     2.0119 (3.20)     0.0301 (4.56)     2.0285 (3.21)     0.0527 (5.00)          1;0  0.4970 (0.31)          5           1
test_wide_rename[10000-ALL_CAPS] (NOW)              0.6203 (1.0)      0.6361 (1.0)      0.6286 (1.0)      0.0066 (1.0)      0.6314 (1.0)      0.0106 (1.0)           2;0  1.5909 (1.0)           5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-format_string]': 2 tests ---------------------------------------------------------------------------
Name (time in s)                                            Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-format_string] (0001_89eec7d)     1.9250 (3.54)     2.0027 (3.64)     1.9647 (3.59)     0.0337 (12.17)    1.9790 (3.62)     0.0567 (25.22)         2;0  0.5090 (0.28)          5           1
test_wide_rename[10000-format_string] (NOW)              0.5430 (1.0)      0.5508 (1.0)      0.5470 (1.0)      0.0028 (1.0)      0.5470 (1.0)      0.0022 (1.0)           2;0  1.8282 (1.0)           5           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-function]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                       Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-function] (0001_89eec7d)     1.9276 (3.67)     1.9789 (3.56)     1.9571 (3.59)     0.0205 (1.53)     1.9660 (3.56)     0.0296 (1.42)          2;0  0.5110 (0.28)          5           1
test_wide_rename[10000-function] (NOW)              0.5259 (1.0)      0.5564 (1.0)      0.5452 (1.0)      0.0133 (1.0)      0.5529 (1.0)      0.0208 (1.0)           1;0  1.8341 (1.0)           5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-snake_case]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                         Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-snake_case] (0001_89eec7d)     1.3223 (4.62)     1.3614 (4.19)     1.3434 (4.44)     0.0173 (1.05)     1.3468 (4.45)     0.0313 (1.12)          2;0  0.7444 (0.23)          5           1
test_wide_rename[10000-snake_case] (NOW)              0.2861 (1.0)      0.3250 (1.0)      0.3028 (1.0)      0.0165 (1.0)      0.3023 (1.0)      0.0280 (1.0)           2;0  3.3026 (1.0)           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
======================================================================================== 16 passed in 28.28s =========================================================================================

@cpcloud
Copy link
Member Author

cpcloud commented Jul 20, 2024

I was able to eke out some more performance by bypassing binding altogether and constructing Project "by hand". Skipping binding is possible in the rename case for the same reason skipping dereferencing and rewriting is possible.

The latest benchmarks show a 6-12x improvement over main:

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-ALL_CAPS]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                   Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-ALL_CAPS] (0001_7e31f91)     1.8625 (7.50)     2.5942 (7.45)     1.9811 (7.68)     0.0566 (8.50)     1.9767 (7.66)     0.0236 (3.18)       82;100    504.7577 (0.13)        497           1
test_wide_rename[10-ALL_CAPS] (NOW)              0.2484 (1.0)      0.3480 (1.0)      0.2580 (1.0)      0.0067 (1.0)      0.2582 (1.0)      0.0074 (1.0)        546;57  3,875.4098 (1.0)        3080           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------- benchmark 'test_wide_rename[10-format_string]': 2 tests ------------------------------------------------------------------------------
Name (time in ms)                                        Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-format_string] (0001_7e31f91)     1.7936 (8.59)     2.3779 (8.51)     1.8608 (8.46)     0.0462 (5.14)     1.8487 (8.50)     0.0535 (4.90)        88;10    537.3972 (0.12)        504           1
test_wide_rename[10-format_string] (NOW)              0.2088 (1.0)      0.2796 (1.0)      0.2199 (1.0)      0.0090 (1.0)      0.2175 (1.0)      0.0109 (1.0)        585;59  4,547.1202 (1.0)        1970           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-function]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                   Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-function] (0001_7e31f91)     1.7325 (8.33)     2.5269 (8.26)     1.8462 (8.53)     0.0627 (11.89)    1.8455 (8.60)     0.0588 (8.69)        127;9    541.6404 (0.12)        518           1
test_wide_rename[10-function] (NOW)              0.2080 (1.0)      0.3059 (1.0)      0.2164 (1.0)      0.0053 (1.0)      0.2145 (1.0)      0.0068 (1.0)        599;49  4,620.3534 (1.0)        3856           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-no_op_function]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                         Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-no_op_function] (0001_7e31f91)     1.2135 (5.92)     2.2333 (6.54)     1.3354 (6.15)     0.0568 (11.56)    1.3248 (6.13)     0.0404 (12.24)       55;32    748.8179 (0.16)        694           1
test_wide_rename[10-no_op_function] (NOW)              0.2051 (1.0)      0.3414 (1.0)      0.2170 (1.0)      0.0049 (1.0)      0.2162 (1.0)      0.0033 (1.0)      1016;576  4,607.9420 (1.0)        4197           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-no_op_string]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                       Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-no_op_string] (0001_7e31f91)     1.2499 (5.91)     1.3981 (4.55)     1.2918 (5.87)     0.0290 (6.04)     1.2850 (5.84)     0.0372 (7.29)       190;30    774.1132 (0.17)        698           1
test_wide_rename[10-no_op_string] (NOW)              0.2116 (1.0)      0.3073 (1.0)      0.2200 (1.0)      0.0048 (1.0)      0.2199 (1.0)      0.0051 (1.0)       1331;93  4,544.4441 (1.0)        4252           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[10-snake_case]': 2 tests -----------------------------------------------------------------------------
Name (time in ms)                                     Min               Max              Mean            StdDev            Median               IQR            Outliers         OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10-snake_case] (0001_7e31f91)     1.3109 (5.31)     1.8762 (3.45)     1.3560 (5.10)     0.0354 (3.05)     1.3454 (5.07)     0.0352 (3.35)        95;41    737.4622 (0.20)        714           1
test_wide_rename[10-snake_case] (NOW)              0.2468 (1.0)      0.5441 (1.0)      0.2660 (1.0)      0.0116 (1.0)      0.2652 (1.0)      0.0105 (1.0)        382;52  3,760.0362 (1.0)        2856           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-ALL_CAPS]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                     Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-ALL_CAPS] (0001_7e31f91)     17.9019 (8.66)     23.2313 (7.01)     18.6106 (8.54)     0.7244 (2.93)     18.5414 (8.74)     0.4645 (15.40)         2;1   53.7328 (0.12)         54           1
test_wide_rename[100-ALL_CAPS] (NOW)               2.0661 (1.0)       3.3139 (1.0)       2.1800 (1.0)      0.2468 (1.0)       2.1222 (1.0)      0.0302 (1.0)         27;32  458.7199 (1.0)         454           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------- benchmark 'test_wide_rename[100-format_string]': 2 tests ------------------------------------------------------------------------------
Name (time in ms)                                          Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-format_string] (0001_7e31f91)     16.9948 (9.96)     18.8691 (8.23)     17.7450 (10.05)    0.4318 (6.52)     17.7376 (10.11)    0.2804 (6.38)        17;11   56.3538 (0.10)         49           1
test_wide_rename[100-format_string] (NOW)               1.7063 (1.0)       2.2927 (1.0)       1.7658 (1.0)      0.0663 (1.0)       1.7545 (1.0)      0.0440 (1.0)         25;24  566.3194 (1.0)         544           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-function]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                     Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-function] (0001_7e31f91)     17.2370 (10.51)    18.7306 (8.22)     17.9392 (10.45)    0.3544 (6.24)     17.9321 (10.49)    0.3479 (14.92)        18;4   55.7439 (0.10)         57           1
test_wide_rename[100-function] (NOW)               1.6401 (1.0)       2.2778 (1.0)       1.7174 (1.0)      0.0568 (1.0)       1.7092 (1.0)      0.0233 (1.0)         38;43  582.2754 (1.0)         564           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-no_op_function]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                           Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-no_op_function] (0001_7e31f91)     11.6531 (7.22)     13.2310 (4.74)     12.0870 (7.15)     0.2633 (2.08)     12.1118 (7.29)     0.1833 (4.33)         20;7   82.7334 (0.14)         84           1
test_wide_rename[100-no_op_function] (NOW)               1.6149 (1.0)       2.7924 (1.0)       1.6905 (1.0)      0.1268 (1.0)       1.6620 (1.0)      0.0423 (1.0)         33;43  591.5578 (1.0)         576           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-no_op_string]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                         Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-no_op_string] (0001_7e31f91)     11.5944 (7.26)     12.2821 (4.29)     11.8527 (6.80)     0.1541 (1.0)      11.8223 (6.92)     0.1617 (4.21)         24;4   84.3690 (0.15)         83           1
test_wide_rename[100-no_op_string] (NOW)               1.5976 (1.0)       2.8607 (1.0)       1.7418 (1.0)      0.1558 (1.01)      1.7076 (1.0)      0.0384 (1.0)         30;50  574.1250 (1.0)         489           1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ benchmark 'test_wide_rename[100-snake_case]': 2 tests -------------------------------------------------------------------------------
Name (time in ms)                                       Min                Max               Mean            StdDev             Median               IQR            Outliers       OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[100-snake_case] (0001_7e31f91)     11.9035 (6.02)     13.1472 (5.72)     12.5405 (6.18)     0.2895 (8.61)     12.5108 (6.19)     0.4071 (16.19)        25;0   79.7419 (0.16)         78           1
test_wide_rename[100-snake_case] (NOW)               1.9777 (1.0)       2.2992 (1.0)       2.0278 (1.0)      0.0336 (1.0)       2.0210 (1.0)      0.0252 (1.0)         81;26  493.1563 (1.0)         395           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-ALL_CAPS]': 2 tests ---------------------------------------------------------------------------------
Name (time in ms)                                       Min                 Max                Mean             StdDev              Median                IQR            Outliers      OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-ALL_CAPS] (0001_7e31f91)     181.7512 (8.99)     232.4530 (3.51)     200.2187 (9.31)     24.7367 (3.74)     186.1063 (9.07)     48.4381 (273.45)        2;0   4.9945 (0.11)          6           1
test_wide_rename[1000-ALL_CAPS] (NOW)               20.2228 (1.0)       66.3168 (1.0)       21.5112 (1.0)       6.6077 (1.0)       20.5216 (1.0)       0.1771 (1.0)           1;5  46.4875 (1.0)          48           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-format_string]': 2 tests ---------------------------------------------------------------------------------
Name (time in ms)                                            Min                 Max                Mean             StdDev              Median               IQR            Outliers      OPS            Rounds  Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-format_string] (0001_7e31f91)     174.5200 (10.64)    224.4481 (13.20)    185.3422 (11.13)    19.2670 (153.92)   177.9721 (10.69)    4.1288 (37.15)         1;1   5.3954 (0.09)          6           1
test_wide_rename[1000-format_string] (NOW)               16.4091 (1.0)       16.9984 (1.0)       16.6550 (1.0)       0.1252 (1.0)       16.6535 (1.0)      0.1111 (1.0)          15;7  60.0421 (1.0)          59           1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-function]': 2 tests --------------------------------------------------------------------------------
Name (time in ms)                                       Min                 Max                Mean             StdDev              Median               IQR            Outliers      OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-function] (0001_7e31f91)     172.3144 (10.89)    223.6343 (3.67)     182.5580 (10.69)    20.1857 (3.50)     174.3930 (10.65)    3.3402 (7.45)          1;1   5.4777 (0.09)          6           1
test_wide_rename[1000-function] (NOW)               15.8175 (1.0)       60.9747 (1.0)       17.0771 (1.0)       5.7703 (1.0)       16.3740 (1.0)      0.4486 (1.0)           1;2  58.5581 (1.0)          60           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-no_op_function]': 2 tests ---------------------------------------------------------------------------------
Name (time in ms)                                             Min                 Max                Mean             StdDev              Median                IQR            Outliers      OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-no_op_function] (0001_7e31f91)     115.6031 (7.27)     171.4313 (10.40)    131.2524 (8.12)     21.2703 (134.26)   120.9782 (7.50)     12.8057 (45.38)         2;2   7.6189 (0.12)          9           1
test_wide_rename[1000-no_op_function] (NOW)               15.9003 (1.0)       16.4760 (1.0)       16.1707 (1.0)       0.1584 (1.0)       16.1335 (1.0)       0.2822 (1.0)          27;0  61.8402 (1.0)          61           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-no_op_string]': 2 tests --------------------------------------------------------------------------------
Name (time in ms)                                           Min                 Max                Mean             StdDev              Median               IQR            Outliers      OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-no_op_string] (0001_7e31f91)     117.0140 (7.40)     161.6273 (2.67)     123.7390 (7.18)     14.3827 (2.43)     118.1594 (7.24)     3.8543 (8.64)          1;1   8.0815 (0.14)          9           1
test_wide_rename[1000-no_op_string] (NOW)               15.8131 (1.0)       60.5694 (1.0)       17.2285 (1.0)       5.9209 (1.0)       16.3114 (1.0)      0.4461 (1.0)           1;5  58.0434 (1.0)          56           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------- benchmark 'test_wide_rename[1000-snake_case]': 2 tests --------------------------------------------------------------------------------
Name (time in ms)                                         Min                 Max                Mean            StdDev              Median               IQR            Outliers      OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[1000-snake_case] (0001_7e31f91)     128.1640 (6.35)     134.9786 (4.81)     131.4051 (6.17)     2.7593 (1.35)     131.9092 (6.42)     5.1171 (32.61)         3;0   7.6101 (0.16)          6           1
test_wide_rename[1000-snake_case] (NOW)               20.1895 (1.0)       28.0657 (1.0)       21.3040 (1.0)      2.0433 (1.0)       20.5374 (1.0)      0.1569 (1.0)           6;9  46.9395 (1.0)          49           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-ALL_CAPS]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                       Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-ALL_CAPS] (0001_7e31f91)     2.0167 (9.92)     2.0826 (7.59)     2.0434 (8.52)     0.0299 (1.0)      2.0269 (7.93)     0.0509 (1.0)           1;0  0.4894 (0.12)          5           1
test_wide_rename[10000-ALL_CAPS] (NOW)              0.2033 (1.0)      0.2744 (1.0)      0.2398 (1.0)      0.0332 (1.11)     0.2557 (1.0)      0.0594 (1.17)          3;0  4.1701 (1.0)           5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-format_string]': 2 tests ---------------------------------------------------------------------------
Name (time in s)                                            Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-format_string] (0001_7e31f91)     1.9152 (11.34)    1.9972 (8.83)     1.9687 (9.79)     0.0358 (1.29)     1.9849 (9.15)     0.0564 (1.14)          1;0  0.5079 (0.10)          5           1
test_wide_rename[10000-format_string] (NOW)              0.1689 (1.0)      0.2261 (1.0)      0.2010 (1.0)      0.0277 (1.0)      0.2170 (1.0)      0.0495 (1.0)           2;0  4.9753 (1.0)           5           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-function]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                       Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-function] (0001_7e31f91)     1.9188 (11.55)    1.9984 (8.95)     1.9640 (9.91)     0.0331 (1.13)     1.9709 (9.11)     0.0550 (1.03)          2;0  0.5092 (0.10)          5           1
test_wide_rename[10000-function] (NOW)              0.1661 (1.0)      0.2233 (1.0)      0.1982 (1.0)      0.0292 (1.0)      0.2163 (1.0)      0.0533 (1.0)           2;0  5.0456 (1.0)           5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-no_op_function]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                             Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-no_op_function] (0001_7e31f91)     1.2814 (7.65)     1.3365 (6.04)     1.3151 (6.94)     0.0206 (1.0)      1.3167 (7.64)     0.0211 (1.0)           2;0  0.7604 (0.14)          5           1
test_wide_rename[10000-no_op_function] (NOW)              0.1675 (1.0)      0.2214 (1.0)      0.1894 (1.0)      0.0269 (1.30)     0.1724 (1.0)      0.0482 (2.28)          1;0  5.2796 (1.0)           5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-no_op_string]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                           Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-no_op_string] (0001_7e31f91)     1.2853 (7.62)     1.3514 (5.80)     1.3175 (6.37)     0.0254 (1.0)      1.3116 (5.99)     0.0365 (1.0)           2;0  0.7590 (0.16)          5           1
test_wide_rename[10000-no_op_string] (NOW)              0.1687 (1.0)      0.2332 (1.0)      0.2069 (1.0)      0.0285 (1.12)     0.2190 (1.0)      0.0555 (1.52)          2;0  4.8328 (1.0)           6           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------- benchmark 'test_wide_rename[10000-snake_case]': 2 tests ----------------------------------------------------------------------------
Name (time in s)                                         Min               Max              Mean            StdDev            Median               IQR            Outliers     OPS            Rounds  Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_wide_rename[10000-snake_case] (0001_7e31f91)     1.3805 (6.80)     1.4446 (5.53)     1.4166 (6.03)     0.0266 (1.0)      1.4115 (5.64)     0.0427 (1.0)           2;0  0.7059 (0.17)          5           1
test_wide_rename[10000-snake_case] (NOW)              0.2030 (1.0)      0.2610 (1.0)      0.2350 (1.0)      0.0279 (1.05)     0.2504 (1.0)      0.0501 (1.17)          2;0  4.2558 (1.0)           5           1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

@cpcloud cpcloud force-pushed the rename-perf branch 2 times, most recently from ceb0032 to dee0e8b Compare July 20, 2024 18:04
@cpcloud cpcloud added this to the 9.2 milestone Jul 21, 2024
@cpcloud cpcloud force-pushed the rename-perf branch 3 times, most recently from 08d8bac to fc491c0 Compare July 21, 2024 13:41
@cpcloud cpcloud requested review from jcrist and gforsyth July 22, 2024 11:38
Copy link
Member

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

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

Nice! Small nit but not blocking.

ibis/expr/types/relations.py Outdated Show resolved Hide resolved
ibis/expr/types/relations.py Outdated Show resolved Hide resolved
@cpcloud cpcloud enabled auto-merge (squash) July 22, 2024 13:28
@cpcloud cpcloud merged commit e56489e into ibis-project:main Jul 22, 2024
82 checks passed
@cpcloud cpcloud deleted the rename-perf branch July 22, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Issues or PRs related to ibis's internal APIs performance Issues related to ibis's performance ux User experience related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants