[Mlir-commits] [mlir] [MLIR] Add a second map for registered OperationName in MLIRContext (NFC) (PR #87170)

Jacques Pienaar llvmlistbot at llvm.org
Mon Apr 1 04:14:09 PDT 2024


jpienaar wrote:

Larger speedup than expected. What is size cost?

OOC could the slower string lookup one be completedly avoided/localized? I'm guessing not without iteration for the case where you only have the string (and not the class, and potentially could be dynamically constructing the string), and in that case the lookup is linear in terms of all op types registered. But that also feels like it should be an exceptional case/one where one could derive a map only if and when needed rather than carrying both. Or am I underestimating the frequency of use?

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


More information about the Mlir-commits mailing list