In vale.cpp we call optimize twice, which might increase compile time a bit. Investigate if there's any regression when we take it out.