[llvm-dev] Trying to use unordered_map

Paul C. Anagnostopoulos via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 8 04:51:33 PST 2020


I will try profiling it.

At 12/8/2020 01:57 AM, Chris Lattner wrote:


>> 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