Hello everyone,

I would like to know whether

        if (symbol in symbols)
                return symbols[symbol];

is any less efficient than

        auto tmp = symbol in symbols;
        if (tmp !is null)
                return *tmp;

Without optimisation, it looks like the first example
searches for `symbol' twice.

Thanks,
Matej

Reply via email to