diff options
| author | Peter LaFosse <peter@vector35.com> | 2026-03-10 12:27:34 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2026-03-26 17:56:23 -0400 |
| commit | 260ca61d94134b6743807e29f64b5ce4f6918d73 (patch) | |
| tree | 9b77dc9990873549f096c5eae00a2b924215946b /basedetection.cpp | |
| parent | 0789f70c4a7496cf23672011cdb5bf5b8a5738c6 (diff) | |
Rewrite GNU3 demangler for performance using DemangledTypeNode
Replace the TypeBuilder-based demangling path with a lightweight
DemangledTypeNode representation that defers type object construction
until the symbol is fully parsed. This avoids repeated heap allocation
and ref-count churn during recursive descent.
Key changes:
- Add DemangledTypeNode / demangled_type_node.{h,cpp}: a compact IR
that mirrors the type grammar without allocating BN Type objects
- Use a thread_local demangler instance to amortize vector allocations
across calls
- Also commonize some of the demangled string length calculations.
Result: ~3x throughput improvement on a 180K-symbol corpus with
97.7% success rate (matching the previous implementation).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'basedetection.cpp')
0 files changed, 0 insertions, 0 deletions
