Reduce replace operation counts.