No, `in` operator is extremely slow when used like this—and this is absolutely a hot path.