**Describe the situation**
multiIf works 10 times slower than If with single condition.

**How to reproduce**
ClickHouse version 21.10

```

SELECT count()
FROM numbers_mt(1000000000)
WHERE NOT ignore(multiIf(number = 0, NULL, toNullable(number)))

┌────count()─┐
│ 1000000000 │
└────────────┘

1 rows in set. Elapsed: 10.267 sec. Processed 1.00 billion rows, 8.00 GB (97.41 million rows/s., 779.25 MB/s.)

SELECT count()
FROM numbers_mt(1000000000)
WHERE NOT ignore(If(number = 0, NULL, toNullable(number)))

┌────count()─┐
│ 1000000000 │
└────────────┘

1 rows in set. Elapsed: 1.010 sec. Processed 1.00 billion rows, 8.00 GB (990.63 million rows/s., 7.93 GB/s.)
```

**Expected performance**
The same performance for multiIf and if.

}
    std::unordered_set<String> group_by_hashes;
    if (auto group_by = select_query->groupBy())
    {
        if (select_query->group_by_with_grouping_sets)
        {
            for (auto & set : group_by->children)
            {
                for (auto & elem : set->children)
                {
                    auto hash = elem->getTreeHash();
                    String key = toString(hash.first) + '_' + toString(hash.second);
                    group_by_hashes.insert(key);
                }
            }
        }
        else
        {
            for (auto & elem : group_by->children)
            {
                auto hash = elem->getTreeHash();
                String key = toString(hash.first) + '_' + toString(hash.second);
                group_by_hashes.insert(key);
            }
        }
    }
    auto sorting_key_columns = result.storage_snapshot ? result.storage_snapshot->metadata->getSortingKeyColumns() : Names{};
    bool is_sorting_key_prefix = true;
    for (size_t i = 0; i < order_by->children.size(); ++i)
    {