Using Intel TBB to paralelize the optimization. Great speed improvements, same output.