Merge "Replace division with bit shift in choose_partitioning"