Commit bcaf099
committed
Add semantic analysis benchmarks and optimization documentation
- Add divan benchmarks for compiler semantic analysis phase
(internal/compiler/benches/semantic_analysis.rs)
- Add custom allocator to track allocations in the benchmark.
- Add benches for individual phases of compilation and a proc-macro simulation mode.
- Document allocation hotspots and optimization strategies
(docs/semantic-analysis-optimization.md)
Benchmarks cover:
- Lexing and parsing performance
- Full compilation with various stress scenarios
- Specific hotspots: many children, properties, exports,
states, nested components, deep expressions, binding chains
The optimization doc identifies key issues:
- O(n²) export sorting
- Element duplication in inlining pass
- Incremental Vec growth patterns
- SmallVec sizing recommendations1 parent 352ebae commit bcaf099
File tree
3 files changed
+969
-0
lines changed- docs
- internal/compiler
- benches
3 files changed
+969
-0
lines changed
0 commit comments