[llvm-dev] Trying to use unordered_map

Paul C. Anagnostopoulos via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 1 15:45:52 PST 2020


Here are some statistics for those of you who like statistics.

Before embarking on a project to speed up access to record fields in TableGen, I thought I'd collect a little data.

Number of records built from the AMDGPU .td files: 55,539
Number of fields in those records: 2,877,918
Average number of fields per record: 52
So the average field lookup sequential scan is about 25 iterations

Number of field lookups performed by DAG ISel emitter: 6,294,426
Number of iterations = 6,294,426 x 25 = 157,000,000 (approx.)

How long does each iteration take? Can it be more than 10 instructions? It's 7 instructions on the X86. So perhaps about 3 ns.? (I may be off here.)

Time saved if the field access could be cut to 0 ns.: 472,000,000 ns.

Next project!






More information about the llvm-dev mailing list