Validation is trivial, I simply used BenchmarkDotNet test and had AI flip git between latest HEAD state and current state.
Optimization is where the real work was - but also fun because I would just think of something, and AI would make it happen. It also had great ideas of its own. Feedback mechanism is crucial.