switch to SmallPtrSet instead of std::set, saving 1K from the