Skip to content

Commit

Permalink
perf: elide unneeded work in window? (#14108)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Jan 30, 2024
1 parent bc9aac2 commit a648478
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions crates/polars-lazy/src/physical_plan/expressions/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,20 +685,6 @@ where
T: PolarsNumericType,
ChunkedArray<T>: IntoSeries,
{
let mut idx_mapping = Vec::with_capacity(len);
let mut iter = 0..len as IdxSize;
match groups {
GroupsProxy::Idx(groups) => {
for g in groups.all() {
idx_mapping.extend((&mut iter).take(g.len()).zip(g.iter().copied()));
}
},
GroupsProxy::Slice { groups, .. } => {
for &[first, len] in groups {
idx_mapping.extend((&mut iter).take(len as usize).zip(first..first + len));
}
},
}
let mut values = Vec::with_capacity(len);
let ptr: *mut T::Native = values.as_mut_ptr();
// safety:
Expand Down

0 comments on commit a648478

Please sign in to comment.