-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEA] Performance improvement for mixed left semi/anti join (#15288)
Current implementation of mixed semi/anti join probes the built hash table twice -- once to find the output table size and once to build the output. Since the upper bound on output table size is O(N) where N is the size of the left table, we can avoid probing twice and achieve a faster join implementation. This implementation reserves the required upper memory bound, builds the output, and then collects the relevant output rows. This probes the hash table only once. This PR also removes the size kernels for mixed semi join and output size parameters passed to the mixed semi join. Closes #15250 # Benchmark Results from cudf repository ## mixed_left_semi_join_32bit (New implementation) ### [0] NVIDIA TITAN V ``` | Key Type | Payload Type | Nullable | Build Table Size | Probe Table Size | Samples | CPU Time | Noise | GPU Time | Noise | |----------|--------------|----------|------------------|------------------|---------|------------|-------|------------|-------| | I32 | I32 | 0 | 100000 | 100000 | 1920x | 266.239 us | 3.43% | 261.324 us | 2.84% | | I32 | I32 | 0 | 100000 | 400000 | 1024x | 495.434 us | 1.18% | 490.544 us | 0.63% | | I32 | I32 | 0 | 10000000 | 10000000 | 24x | 20.919 ms | 0.04% | 20.914 ms | 0.03% | | I32 | I32 | 0 | 10000000 | 40000000 | 11x | 54.697 ms | 0.03% | 54.692 ms | 0.03% | | I32 | I32 | 0 | 10000000 | 100000000 | 11x | 122.171 ms | 0.03% | 122.166 ms | 0.03% | | I32 | I32 | 0 | 80000000 | 100000000 | 11x | 192.979 ms | 0.01% | 192.975 ms | 0.01% | | I32 | I32 | 0 | 100000000 | 100000000 | 11x | 212.878 ms | 0.01% | 212.874 ms | 0.01% | | I32 | I32 | 0 | 10000000 | 240000000 | 11x | 279.794 ms | 0.01% | 279.790 ms | 0.01% | | I32 | I32 | 0 | 80000000 | 240000000 | 11x | 351.186 ms | 0.01% | 351.183 ms | 0.01% | | I32 | I32 | 0 | 100000000 | 240000000 | 11x | 370.794 ms | 0.01% | 370.790 ms | 0.01% | ``` ## mixed_left_semi_join_32bit (Old implementation) ### [0] NVIDIA TITAN V ``` | Key Type | Payload Type | Nullable | Build Table Size | Probe Table Size | Samples | CPU Time | Noise | GPU Time | Noise | |----------|--------------|----------|------------------|------------------|---------|------------|-------|------------|-------| | I32 | I32 | 0 | 100000 | 100000 | 1392x | 368.030 us | 3.05% | 363.065 us | 2.70% | | I32 | I32 | 0 | 100000 | 400000 | 832x | 832.492 us | 0.84% | 827.586 us | 0.60% | | I32 | I32 | 0 | 10000000 | 10000000 | 16x | 32.310 ms | 0.03% | 32.305 ms | 0.03% | | I32 | I32 | 0 | 10000000 | 40000000 | 11x | 100.222 ms | 0.03% | 100.218 ms | 0.03% | | I32 | I32 | 0 | 10000000 | 100000000 | 11x | 235.874 ms | 0.01% | 235.870 ms | 0.01% | | I32 | I32 | 0 | 80000000 | 100000000 | 11x | 307.042 ms | 0.01% | 307.038 ms | 0.01% | | I32 | I32 | 0 | 100000000 | 100000000 | 11x | 326.797 ms | 0.01% | 326.794 ms | 0.01% | | I32 | I32 | 0 | 10000000 | 240000000 | 11x | 552.730 ms | 0.01% | 552.728 ms | 0.01% | | I32 | I32 | 0 | 80000000 | 240000000 | 11x | 624.958 ms | 0.01% | 624.956 ms | 0.01% | | I32 | I32 | 0 | 100000000 | 240000000 | 11x | 644.148 ms | 0.00% | 644.146 ms | 0.00% | ``` Authors: - Tanmay Gujar (https://github.com/tgujar) - Yunsong Wang (https://github.com/PointKernel) Approvers: - Jason Lowe (https://github.com/jlowe) - Yunsong Wang (https://github.com/PointKernel) - Muhammad Haseeb (https://github.com/mhaseeb123) - Bradley Dice (https://github.com/bdice) URL: #15288
- Loading branch information
Showing
10 changed files
with
42 additions
and
992 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
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.