acking-you commented on PR #11247:
URL: https://github.com/apache/datafusion/pull/11247#issuecomment-2211044615

   > I merged against latest `main`, it seems in last 2 days something yielded 
a >2x speedup for query 6.
   > 
   > I get now these mixed results on my (Apple m1 pro) machine:
   > 
   > ```
   > --------------------
   > Benchmark tpch_mem_sf1.json
   > --------------------
   > ┏━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
   > ┃ Query        ┃     main ┃ add_short_circuit ┃        Change ┃
   > ┡━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
   > │ QQuery 1     │  77.06ms │           78.03ms │     no change │
   > │ QQuery 2     │  16.48ms │           16.45ms │     no change │
   > │ QQuery 3     │  23.68ms │           26.24ms │  1.11x slower │
   > │ QQuery 4     │  21.89ms │           22.47ms │     no change │
   > │ QQuery 5     │  35.82ms │           38.72ms │  1.08x slower │
   > │ QQuery 6     │   5.67ms │            6.98ms │  1.23x slower │
   > │ QQuery 7     │  82.14ms │           76.61ms │ +1.07x faster │
   > │ QQuery 8     │  20.69ms │           21.64ms │     no change │
   > │ QQuery 9     │  45.88ms │           48.10ms │     no change │
   > │ QQuery 10    │  42.23ms │           44.08ms │     no change │
   > │ QQuery 11    │  32.57ms │           32.57ms │     no change │
   > │ QQuery 12    │  23.49ms │           23.07ms │     no change │
   > │ QQuery 13    │  29.71ms │           28.15ms │ +1.06x faster │
   > │ QQuery 14    │   7.98ms │            7.16ms │ +1.11x faster │
   > │ QQuery 15    │  14.45ms │           14.77ms │     no change │
   > │ QQuery 16    │  18.54ms │           19.55ms │  1.05x slower │
   > │ QQuery 17    │  61.68ms │           63.54ms │     no change │
   > │ QQuery 18    │ 131.52ms │          146.46ms │  1.11x slower │
   > │ QQuery 19    │  22.75ms │           22.64ms │     no change │
   > │ QQuery 20    │  32.10ms │           30.86ms │     no change │
   > │ QQuery 21    │  98.63ms │           97.17ms │     no change │
   > │ QQuery 22    │   9.83ms │           10.55ms │  1.07x slower │
   > └──────────────┴──────────┴───────────────────┴───────────────┘
   > ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
   > ┃ Benchmark Summary                ┃          ┃
   > ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
   > │ Total Time (main)                │ 854.79ms │
   > │ Total Time (add_short_circuit)   │ 875.83ms │
   > │ Average Time (main)              │  38.85ms │
   > │ Average Time (add_short_circuit) │  39.81ms │
   > │ Queries Faster                   │        3 │
   > │ Queries Slower                   │        6 │
   > │ Queries with No Change           │       13 │
   > └──────────────────────────────────┴──────────┘
   > --------------------
   > Benchmark tpch_sf1.json
   > --------------------
   > ┏━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
   > ┃ Query        ┃     main ┃ add_short_circuit ┃    Change ┃
   > ┡━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
   > │ QQuery 1     │ 148.26ms │          148.34ms │ no change │
   > │ QQuery 2     │  67.87ms │           67.88ms │ no change │
   > │ QQuery 3     │  69.60ms │           71.52ms │ no change │
   > │ QQuery 4     │  52.01ms │           53.10ms │ no change │
   > │ QQuery 5     │  82.18ms │           83.01ms │ no change │
   > │ QQuery 6     │  31.38ms │           32.28ms │ no change │
   > │ QQuery 7     │ 105.18ms │          102.67ms │ no change │
   > │ QQuery 8     │  93.49ms │           92.19ms │ no change │
   > │ QQuery 9     │ 134.92ms │          136.07ms │ no change │
   > │ QQuery 10    │ 125.29ms │          124.37ms │ no change │
   > │ QQuery 11    │  48.71ms │           49.17ms │ no change │
   > │ QQuery 12    │  82.64ms │           82.86ms │ no change │
   > │ QQuery 13    │ 191.46ms │          190.90ms │ no change │
   > │ QQuery 14    │  49.91ms │           48.91ms │ no change │
   > │ QQuery 15    │  63.63ms │           61.70ms │ no change │
   > │ QQuery 16    │  53.03ms │           52.23ms │ no change │
   > │ QQuery 17    │ 128.33ms │          128.75ms │ no change │
   > │ QQuery 18    │ 164.81ms │          167.84ms │ no change │
   > │ QQuery 19    │  89.80ms │           88.97ms │ no change │
   > │ QQuery 20    │  81.85ms │           83.98ms │ no change │
   > │ QQuery 21    │ 128.79ms │          132.33ms │ no change │
   > │ QQuery 22    │  40.00ms │           40.72ms │ no change │
   > └──────────────┴──────────┴───────────────────┴───────────┘
   > ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
   > ┃ Benchmark Summary                ┃           ┃
   > ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
   > │ Total Time (main)                │ 2033.15ms │
   > │ Total Time (add_short_circuit)   │ 2039.79ms │
   > │ Average Time (main)              │   92.42ms │
   > │ Average Time (add_short_circuit) │   92.72ms │
   > │ Queries Faster                   │         0 │
   > │ Queries Slower                   │         0 │
   > │ Queries with No Change           │        22 │
   > └──────────────────────────────────┴───────────┘
   > ```
   
   I retested several times, and the results varied. There wasn't a significant 
improvement in the TPC-H benchmark scenarios🥲🥲. However, in our internal 
extreme SQL use cases (where `left` joins mostly hit and the `right` side is 
computationally heavy), I saw a fourfold performance boost.
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to