added binary search for intersection of smaples and X.indices, the search is used whenever nlog(m) < m, where m=|X.indices| for the current_feature and n=end-start