f5f6005f80
- Implement RustObjective trait for GIL-free parallelization
- Add 5 benchmark functions: Sphere, Rosenbrock, Rastrigin, Ackley, Griewank
* Each implements RustObjective with evaluate(), dimension(), global_optimum()
* Exposed to Python with __call__ method
- Add parallel_differential_evolution_rust() function:
* Uses Rayon for parallel population evaluation
* Works with RustObjective implementations only
* Eliminates Python GIL overhead for 10-100× speedup
* Supports all DE strategies and adaptive parameters
- Create comprehensive examples:
* parallel_de_benchmark.py: Performance benchmarks showing speedup
* polaroid_optimizr_integration.py: 4 workflows combining Polaroid + OptimizR
- Regime detection with HMM
- Strategy parameter optimization
- Portfolio risk analysis
- Pairs trading pipeline
- Module integration:
* Export benchmark functions in Python API
* Export parallel_differential_evolution_rust
* Update __init__.py and core.py with new functions
- Technical implementation:
* RustObjective trait in src/rust_objectives.rs
* Parallel evaluation uses par_iter() from Rayon
* Per-thread RNG seeding for reproducibility
* Maintains same API as standard DE for easy comparison
Part of Priority 2: Enable Rust parallelization (Enhancement Strategy)
Expected speedup: 10-100× on multi-core systems for pure Rust objectives