45 lines
1.2 KiB
Markdown
45 lines
1.2 KiB
Markdown
# SymClaw Benchmarks
|
|
|
|
Criterion-based benchmarks for the SymClaw symbolic math engine.
|
|
|
|
## Running
|
|
|
|
```bash
|
|
cargo bench -p symclaw-benchmarks
|
|
```
|
|
|
|
Run a specific group:
|
|
|
|
```bash
|
|
cargo bench -p symclaw-benchmarks -- parsing
|
|
cargo bench -p symclaw-benchmarks -- differentiation
|
|
```
|
|
|
|
## Benchmark Groups
|
|
|
|
| Group | What it measures |
|
|
|---|---|
|
|
| **parsing** | Expression parsing (simple → complex) |
|
|
| **simplification** | Identity removal, constant folding, like-term combination, e-graph |
|
|
| **differentiation** | Polynomial, trig, chain rule depth, higher-order (5th derivative) |
|
|
| **integration** | Power rule, trig, integration by parts |
|
|
| **solving** | Linear, quadratic, cubic equation solving |
|
|
| **series** | Maclaurin and Taylor series expansion |
|
|
| **egraph** | E-graph simplification (identities, trig, distribution) |
|
|
| **latex** | LaTeX rendering |
|
|
|
|
## Comparing Across Runs
|
|
|
|
Criterion automatically compares against the previous run and reports percentage changes. HTML reports are saved to:
|
|
|
|
```
|
|
target/criterion/<group>/<benchmark>/report/index.html
|
|
```
|
|
|
|
To save a baseline for later comparison:
|
|
|
|
```bash
|
|
cargo bench -p symclaw-benchmarks -- --save-baseline my_baseline
|
|
cargo bench -p symclaw-benchmarks -- --baseline my_baseline
|
|
```
|