Skip to content
Snippets Groups Projects

refactoring(perf): reduce memory allocations

Merged Denis Smirnov requested to merge perf into main

Summarize the changes

  • refactoring(perf): reduce memory allocations
  1. Implement an improved version of PostOrder tree traversal that puts nodes into the result vector only if they apply the filter.
  2. Avoid string allocation caused by ok_or instead of the ok_or_else.
  3. Remove dead code.

Ensure that

  • New code is covered by unit and integration tests.
  • Related issues would be automatically closed with gitlab's closing pattern (Closes #1, #2).
  • Public modules are documented (check the rendered version with cargo doc --open).
  • (if PEST grammar is changed) EBNF grammar reflects these changes (check the result with railroad diagram generator.

Next steps

Edited by Denis Smirnov

Merge request reports

Pipeline #22590 passed

Pipeline passed for 2da4007f on perf

Approval is optional

Merged by Denis SmirnovDenis Smirnov 1 year ago (Aug 23, 2023 3:50am UTC)

Merge details

Pipeline #22591 passed

Pipeline passed for 2da4007f on main

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading