SC-653: Optimisation for large scale machine learning