[llvm-dev] Trying to use unordered_map
Chris Lattner via llvm-dev
llvm-dev at lists.llvm.org
Mon Dec 7 22:57:43 PST 2020
> On Dec 7, 2020, at 10:39 AM, Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> I implemented a map for Record fields using StringMap. The map is created when the backend does a getAllDerivedDefinitions(), under the assumption that it will then access the values from the returned vector of Record's.
>
> This resulted in a noticeable slowdown of the backends, on the order of 10%. The time to construct the maps appears to overwhelm any savings in accessing the field values.
>
> I'm going to try some other tricks, but I think this is a dead end.
Hi Paul,
Have you profiled the result? For example, on a Mac you can use the Instruments tool that comes with Xcode. On linux you can use a variety of perf tools, on windows you can use Visual Studios profiler.
I wonder if you’re getting zero hits on the cache?
-Chris
More information about the llvm-dev
mailing list