Optimized solver