Skip to content

Commit f643b49

Browse files
authored
Add semantic analysis benchmarks (#10373)
* Add semantic analysis benchmarks - 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. 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
1 parent 8accfc2 commit f643b49

File tree

3 files changed

+543
-0
lines changed

3 files changed

+543
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/compiler/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ i-slint-parser-test-macro = { path = "./parser-test-macro" }
8585
regex = "1.3.7"
8686
spin_on = { workspace = true }
8787
rayon = { workspace = true }
88+
divan = "0.1.14"
89+
90+
[[bench]]
91+
name = "semantic_analysis"
92+
harness = false
93+
required-features = ["rust"]
8894

8995
[package.metadata.docs.rs]
9096
features = [

0 commit comments

Comments
 (0)