llamacpp-0001: llama-grammar.cpp advance_stack/accept_token stacks_new
dedup via std::find on vector<vector<ptr>>, O(S^2) per grammar-constrained
token. Fix: companion std::set<llama_grammar_stack> for O(S log S). ~16x at S=300.
aria2-0001: DHTPeerAnnounceEntry addPeerAddrEntry peerAddrEntries_ vector
std::find dedup, O(P^2) as DHT peers accumulate per infohash. Fix:
unordered_map keyed by ip:port for O(P) amortized. ~15x at P=3000.
Both: MOADs 0002-0005 CLEAN per scan markers.