Benchmarks¶
The benchmarks/ directory of the repository holds three benchmarks. Each writes its results to
benchmarks/results/ (or benchmarks/agents/results/), one directory per run, with the environment it ran
in. Timings depend on the machine and its load; the accuracy figures do not.
| Benchmark | Script | What it measures |
|---|---|---|
| Cross-method benchmark | benchmarks/run.py |
Accuracy against a reference and cost (wall time, peak memory) of every installed backend, on CPU and GPU, across a ladder of resolutions. Problem suites are generated by benchmarks/problems.py. |
| BEM convergence | benchmarks/bem_convergence.py |
Error of BEM, DDA and FDTD against Mie for a gold sphere, versus resolution and cost. See BEM. |
| Agent benchmark | benchmarks/agents/run.py |
Whether an AI agent answers photonics questions correctly through the MCP server. |
benchmarks/README.md describes how to reproduce the cross-method runs and every option of run.py.