mean() for decimals#8649
Conversation
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Merging this PR will improve performance by 21.05%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | chunked_varbinview_into_canonical[(100, 100)] |
272.2 µs | 306.7 µs | -11.27% |
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
26.8 µs | 16.3 µs | +64% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
273.6 ns | 215.3 ns | +27.1% |
| ⚡ | Simulation | chunked_varbinview_opt_canonical_into[(1000, 10)] |
206.4 µs | 169.7 µs | +21.68% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
205.9 µs | 169.2 µs | +21.64% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[1024] |
333.9 ns | 275.6 ns | +21.17% |
| ⚡ | Simulation | chunked_varbinview_opt_into_canonical[(1000, 10)] |
219.9 µs | 183.2 µs | +20% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[2048] |
427.8 ns | 369.4 ns | +15.79% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing myrrc/decimal-mean (92daf52) with develop (ee2cd67)
Footnotes
-
4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
| DType::Decimal(..) => sum.dtype().with_nullability(Nullability::Nullable), | ||
| _ => DType::Primitive(PType::F64, Nullability::Nullable), | ||
| }; | ||
| let target = DType::Primitive(PType::F64, Nullability::Nullable); |
There was a problem hiding this comment.
should decimal mean be f64 as well? The code previously kept them decimals, I think they should stay decimals
There was a problem hiding this comment.
Hm, okay, that makes sense, I'll rewrite to keep mean as decimal
Support mean() for decimals. Support casting decimals to f64.