devanbenz commented on PR #26249:
URL: https://github.com/apache/datafusion/pull/26249#issuecomment-6303225991

   @adriangb When you get a moment could you please run your same benchmarks 
against this branch again. I pushed up some changes that I was cooking on over 
the past couple days to improve performance.
   
   - Removed the new specialized Expr and am using `HashTableLookupExpr`, so 
pruning is now working
   - Removed the union so we just collect pointers to existing hash tables to 
merge them, this was taking up most of the compute time in my previous impl. 
   
   Locally I'm seeing:
   
   | Config | #26442 (geomean) | #26442 (worst query) | #26249 (geomean) | 
#26249 (worst query) | A/A control (main vs main) |
   | --- | --- | --- | --- | --- | --- |
   | pushdown on, 16 partitions | 0.76 [0.68, 0.83] | 1.02 (Q1) | 0.76 [0.69, 
0.83] | 1.01 (Q1) | 0.99 |
   | pushdown on, 128 partitions | 0.47 [0.38, 0.57] | 1.01 (Q6) | 0.48 [0.40, 
0.59] | 1.01 (Q6) | 1.00 |
   | pushdown off, 16 partitions | 1.02 [1.01, 1.04] | 1.17 (Q9) | 1.01 [1.00, 
1.03] | 1.23 (Q18)\* | 1.00 |
   | pushdown off, 128 partitions | 0.98 [0.90, 1.04] | 1.42 (Q9) | 0.95 [0.87, 
1.00] | 1.07 (Q7) | 1.00 |
   
   \* Caused by one outlier round (241.8s vs ~125s in the other two rounds). 
The A/A control spiked similarly on the same query
   (171.8s vs ~127s).
   
   Using the following machine
   
    i7-12700K (20 threads, x86), 32 GB RAM
   
   with pushdown filters off - all tpch
   
   TPC-H SF10, wall time in seconds (median of 5 hot runs, lower is better). PR 
#26249 at `1e3caf793`, PR #26442 at `4b3684cae`.
   Default settings (`pushdown_filters = false`, 20 partitions), each query in 
its own process.
   
   | query | PR #26442 | PR #26249 | #26249 / #26442 |
   | --- | ---: | ---: | ---: |
   | q01 | 0.439 | 0.447 | 1.02x |
   | q02 | 0.109 | 0.100 | 0.91x |
   | q03 | 0.303 | 0.290 | 0.96x |
   | q04 | 0.134 | 0.133 | 0.99x |
   | q05 | 0.502 | 0.474 | 0.94x |
   | q06 | 0.123 | 0.127 | 1.04x |
   | q07 | 0.792 | 0.647 | 0.82x |
   | q08 | 0.417 | 0.364 | 0.87x |
   | q09 | 0.882 | 0.629 | 0.71x |
   | q10 | 0.409 | 0.402 | 0.98x |
   | q11 | 0.072 | 0.068 | 0.95x |
   | q12 | 0.138 | 0.134 | 0.97x |
   | q13 | 0.301 | 0.300 | 1.00x |
   | q14 | 0.190 | 0.189 | 0.99x |
   | q15 | 0.363 | 0.358 | 0.98x |
   | q16 | 0.086 | 0.088 | 1.01x |
   | q17 | 0.744 | 0.751 | 1.01x |
   | q18 | 0.704 | 0.638 | 0.91x |
   | q19 | 0.240 | 0.242 | 1.01x |
   | q20 | 0.320 | 0.333 | 1.04x |
   | q21 | 1.047 | 0.995 | 0.95x |
   | q22 | 0.063 | 0.063 | 1.01x |
   | **total** | **8.38** | **7.77** | **0.93x** |
   
   With pushdown filters on - all tpch
   
   
   | query | PR #26442 | PR #26249 | #26249 / #26442 |
   | --- | ---: | ---: | ---: |
   | q01 | 0.370 | 0.381 | 1.03x |
   | q02 | 0.094 | 0.093 | 0.99x |
   | q03 | 0.255 | 0.256 | 1.00x |
   | q04 | 0.192 | 0.215 | 1.12x |
   | q05 | 0.262 | 0.282 | 1.08x |
   | q06 | 0.268 | 0.274 | 1.02x |
   | q07 | 0.335 | 0.344 | 1.03x |
   | q08 | 0.367 | 0.341 | 0.93x |
   | q09 | 0.981 | 0.823 | 0.84x |
   | q10 | 0.335 | 0.357 | 1.07x |
   | q11 | 0.077 | 0.071 | 0.92x |
   | q12 | 0.265 | 0.282 | 1.06x |
   | q13 | 0.303 | 0.327 | 1.08x |
   | q14 | 0.169 | 0.170 | 1.00x |
   | q15 | 0.460 | 0.466 | 1.01x |
   | q16 | 0.089 | 0.090 | 1.01x |
   | q17 | 0.254 | 0.248 | 0.98x |
   | q18 | 0.441 | 0.432 | 0.98x |
   | q19 | 0.254 | 0.254 | 1.00x |
   | q20 | 0.238 | 0.225 | 0.95x |
   | q21 | 1.215 | 1.120 | 0.92x |
   | q22 | 0.072 | 0.075 | 1.04x |
   | **total** | **7.30** | **7.13** | **0.98x** |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to