Improved performance of findBestSplit