TableGen question

A question for all you TableGen aficionados:

Does anyone know why the collection of RecordVal field values stored in a Record are represented by a SmallVector rather than some sort of map? This means that every time a record field is looked up by name, a linear search is performed.

Is it a question of RAM usage?

I’m not sure, it could just be a historical issue. Feel free to investigate changing it Paul!

-Chris

How many values are expected?

Neil Nelson

How many values are expected?

The number of fields per record varies. There are (few) records with
zero fields, but also many with dozens (maybe 100?) fields.

Cheers,
Nicolai

Not finding a speed comparison chart right off, but it is usually said that vectors of 100 values or less is the best search speed choice. They will also be the most memory compact and memory local choice.

You will want to benchmark your change against the original.

Neil Nelson