Add patch replacing linear TAILQ_FOREACH scan in mta_handle_envelope()
with tree_get() on a per-relay task_by_msgid splay-tree index; assign
UNDF-2026-000000201. Unit test confirms 100x op-count improvement at
N=100 tasks/relay.
ninja-0001: depfile_parser.cc std::find over ins_/outs_ vectors is O(N) per
token → O(N²) total parse; fix adds unordered_set ins_seen_/outs_seen_ members
to DepfileParser for O(1) duplicate detection (490x at N=1000).
ninja-0002: graph.cc std::find_if over edge->outputs_ called for each depfile
output token is O(M×N); fix builds unordered_set from edge outputs once before
the loop for O(M+N) total (125x at M=N=500).
thrift-0002: t_cpp_generator::is_struct_storage_not_throwing() vector<t_field*>
member deduplication uses std::find O(M²) — fix with unordered_set
victoria-metrics-0002: MetricName RemoveTagsOn/RemoveTagsIgnoring hasTag()
O(T×I) linear scan inside per-metric loop — fix with map-based tag set
pulsar-0007: ModularLoadManagerImpl.reapDeadBrokerPreallocations() takes
List<String> aliveBrokers, calls contains() O(B) per broker — fix with HashSet
kafka-0010: fix unit test worst-case ordering (shared-topic last for slow path)
nmap-0002: nmap.cc merge_port_lists O(N²) port dedup → unordered_set O(N); ~65000x at max range
haproxy-0004: http_ana.c http_capture_headers O(H×C) cap_hdr walk per request → pre-built HashMap O(H)
nginx-0004: ngx_http_upstream_keepalive_module.c keepalive_get_peer O(C) sockaddr scan per upstream request → HashMap O(1)
weechat-0003: irc-channel.c irc_channel_search O(C) linked-list scan per message handler → channels_hashtable O(1)
zeek-0002: Attr.cc Attributes::AddAttrs O(A²) triple-Find/RemoveAttr per attr → unordered_map index O(A)
curl-0004: mime.c search_header O(P×H) 3x per part per mime_add_headers → pre-indexed header name set O(P)
- netty-0001: DnsResolveContext.finalResult ArrayList.contains O(R²) dedup on DNS records
File: resolver-dns/.../dns/DnsResolveContext.java line ~914
Fix: LinkedHashSet gives O(1) dedup with preserved insertion order
Ratio: 24.5x at R=50 records
- dubbo-0002: MethodWalker.walkHierarchy no visited guard — O(2^D) diamond recursion
File: dubbo-rpc-triple/.../rest/util/MethodWalker.java walkHierarchy()
Fix: add visited HashSet, return early if already visited
Ratio: 8x at D=3 (common Spring proxy depth)
- doris-0004: NormalizeRepeat.buildContextWithAlias ImmutableList.contains O(S×G) for GROUPING SETS
File: fe-core/.../nereids/rules/analysis/NormalizeRepeat.java buildContextWithAlias()
Fix: convert groupingSetExpressions to HashSet before loop — O(1) lookup
Ratio: 49x for CUBE(c1..c8), 1000x+ for CUBE(c1..c10)
raylib-0001: GetGlyphIndex scans all G glyphs per character in every
DrawText/MeasureText call — O(T×G) per render. Fix: hash map at load time.
228× speedup at G=1000, 814× at G=4000. UNDF-2026-000000259.
sdl3-0001: SDL3 GPU TRACK_RESOURCE macro does linear scan for duplicate
check before adding a resource to the command buffer tracked list — O(N²)
total across all bind calls per frame. Affects Vulkan, D3D12, and Metal
backends identically. Fix: hash set keyed by pointer identity. 41× at N=1000.
UNDF-2026-000000273.
All 10/10 unit tests PASS.
Self-contained C scanner that reads UNDF-REGISTRY.json, parses patch .md
files to extract file paths and code patterns, walks a target directory
tree, and classifies each registered defect as PATCHED/UNPATCHED/UNKNOWN/
NOT_FOUND. Thread pool via pthreads. Bundled MD5+SHA256, no external deps.