boofun.benchmarks
Performance benchmarking module for BooFun library.
This module provides comprehensive benchmarking tools to measure and compare the performance of different Boolean function representations and algorithms.
Functions
Run a quick benchmark for development testing. |
Classes
|
Comprehensive benchmarking suite for Boolean function operations. |
- class boofun.benchmarks.PerformanceBenchmark(warmup_runs: int = 3, benchmark_runs: int = 10)[source]
Comprehensive benchmarking suite for Boolean function operations.
Measures timing, memory usage, and scalability across different representations and algorithms.
- __init__(warmup_runs: int = 3, benchmark_runs: int = 10) None[source]
Initialize benchmark suite.
- Parameters:
warmup_runs – Number of warmup iterations
benchmark_runs – Number of benchmark iterations for averaging
- benchmark_function(func: Callable[[...], Any], *args: Any, **kwargs: Any) dict[str, Any][source]
Benchmark a single function with multiple runs.
- Parameters:
func – Function to benchmark
*args – Arguments to pass to function
**kwargs –
Arguments to pass to function
- Returns:
Dictionary with timing statistics
- benchmark_creation(n_vars_range: list[int]) dict[str, Any][source]
Benchmark Boolean function creation across different sizes.
- Parameters:
n_vars_range – List of variable counts to test
- Returns:
Benchmark results for each method
- benchmark_evaluation(n_vars_range: list[int]) dict[str, Any][source]
Benchmark function evaluation performance.
- Parameters:
n_vars_range – List of variable counts to test
- Returns:
Evaluation benchmark results
- benchmark_spectral_analysis(n_vars_range: list[int]) dict[str, Any][source]
Benchmark spectral analysis algorithms.
- Parameters:
n_vars_range – List of variable counts to test
- Returns:
Spectral analysis benchmark results
- benchmark_representations(n_vars: int = 6) dict[str, Any][source]
Compare different representation formats.
- Parameters:
n_vars – Number of variables for comparison
- Returns:
Representation comparison results