Skip to content
Snippets Groups Projects

Add object-pool and auto-enums to enhance performance

Merged Michael Aaron Murphy requested to merge pooling into master
2 unresolved threads
  • object-pool exists to reuse strings without allocating
  • auto-enums can prevent the the need to box trait return values

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
131 133 }
132 134 });
133 135
134 let iter_inner_glob: Box<Iterator<Item = String>> = match globs {
135 Some(iter) => Box::new(iter),
136 None => Box::new(iter::once(escape(start))),
136 #[auto_enum(Iterator)]
137 let iter_inner_glob = match globs {
  • 582 582 }
    583 583
    584 584 fn wait(&mut self, pgid: u32, commands: SmallVec<[RefinedJob; 16]>) -> i32 {
    585 let as_string = if commands.is_empty() {
    586 // This doesn't allocate
    587 String::new()
    588 } else {
    589 commands.iter().map(RefinedJob::long).collect::<Vec<String>>().join(" | ")
    590 };
    585 crate::IonPool::string(|as_string| {
    586 if !commands.is_empty() {
    587 let mut iter = commands.iter().map(RefinedJob::long);
  • mentioned in commit 67292ac4

  • Please register or sign in to reply
    Loading