mzabaluev commented on PR #26589:
URL: https://github.com/apache/datafusion/pull/26589#issuecomment-6603405634

   ### Benchmark results: `struct_field_case_when`
   
   Command: `cargo bench -p datafusion-physical-expr --bench case_when -- 
struct_field_case_when`
   
   Each case has 8192 rows. "Items" is the list length in the struct column. 
Times are Criterion medians, run on a MacBook (Darwin 25.6.0). The `main` 
baseline was run with the new benchmark file applied to `main`.
   
   | Expression | Items | `main` | This branch | Speedup |
   |---|---|---|---|---|
   | `CASE WHEN s.a < 10 THEN s.b WHEN s.a < 20 THEN 'b' ... END` | 0 | 558.1 
µs | 235.6 µs | 2.4x |
   | | 4 | 790.3 µs | 236.3 µs | 3.3x |
   | | 16 | 1.423 ms | 236.5 µs | 6.0x |
   | `CASE WHEN s.a < 50 THEN s.a + x ELSE x END` | 0 | 173.7 µs | 41.1 µs | 
4.2x |
   | | 4 | 221.4 µs | 41.2 µs | 5.4x |
   | | 16 | 324.9 µs | 41.0 µs | 7.9x |
   | `CASE s.a WHEN 0 THEN s.b WHEN 1 THEN s.b ... END` | 0 | 230.0 µs | 127.8 
µs | 1.8x |
   | | 4 | 571.0 µs | 126.6 µs | 4.5x |
   | | 16 | 1.597 ms | 127.7 µs | 12.5x |
   
   On `main`, the time grows with the size of the struct's list column. On this 
branch it stays flat, at about 236 µs, 41 µs and 127 µs for the three 
expressions.


-- 
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