You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change uses a local static variable to cache the computed
`StringRef` containing the type's name.
I found that `RelWithDebInfo` builds of MLIR were spending a relatively
large amount of time in `StringRef::find` and I tracked it down to
`getTypeName` which utilizes `StringRef` methods that are defined in a
separate translation unit. This is especially impactful on perf because
`getTypeName` is supposed to be used for debug logging. See an example
here:
https://github.com/llvm/llvm-project/blob/4b825c7417f72ee88ee3e4316d0c01ed463f1241/mlir/include/mlir/IR/Types.h#L294-L300
0 commit comments