Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Improve Growable by avoiding virtual function call. #772

Open
sundy-li opened this issue Jan 17, 2022 · 1 comment
Open

Improve Growable by avoiding virtual function call. #772

sundy-li opened this issue Jan 17, 2022 · 1 comment
Assignees
Labels
enhancement An improvement to an existing feature

Comments

@sundy-li
Copy link
Collaborator

I figured out that dyn growable runs by a slice iterator.

 let mut growable = growable::make_growable(&[lhs, rhs], false, lhs.len());
        let mut start_falsy = 0;
        let mut total_len = 0;
        for (start, len) in SlicesIterator::new(predicate.values()) 
  ...
}

what if we can put the iterator inside the growable trait?

 fn run(&mut self, iter: SlicesIterator  ) -> Box<dyn Array>;

@jorgecarleitao jorgecarleitao added the enhancement An improvement to an existing feature label Jan 17, 2022
@jorgecarleitao
Copy link
Owner

jorgecarleitao commented Jan 17, 2022

Sounds like a great idea! I would call it extend_from_iter<I: Iterator<Item=(usize, usize, usize)>> or something.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants