[llvm] [ADT] Simplify SmallSetIterator with std::variant (NFC) (PR #157229)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 6 09:50:00 PDT 2025


kazutakahirata wrote:

> https://llvm-compile-time-tracker.com/compare.php?from=e0f00bd645bfd75a6717242cc42d63eeebb1db68&to=22587d6d1a9ae5a4e6805fa1dc964818bbbc6cb5&stat=instructions:u
> 
> std::variant should never be used in performance sensitive code.

@nikic Thank you for benchmarking!  I've also verified that `std::variant` does indeed slow down even micro benchmarking.  Closing.

https://github.com/llvm/llvm-project/pull/157229


More information about the llvm-commits mailing list