refactor(scorch): Store scorch structs in a deque and various minor fixes - #3159
refactor(scorch): Store scorch structs in a deque and various minor fixes#3159stephanmeesters wants to merge 5 commits into
Conversation
PR Summary by QodoScorch mark queue: dedupe before eviction and store scorches in std::deque
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
328f969 to
9414e54
Compare
|
The PR description doesn't include why |
Done |
|
It's a bit of a tradeoff. It's clearly a win for the eviction of the oldest scorch mark, but a loss for memory access. An array + head & tail would be faster but make the code more complex so I wouldn't necessarily recommend it. |
Merge by rebase
std::dequeinstead of a fixed-size arrayThe
std::dequeis preferable because 1) it allows for a dynamic number of max scorches (if we were to increase in the future, and make quality level dependent); 2) performance.Todo