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?
> On Oct 6, 2020, at 4:54 PM, Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > 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 On 10/6/20 5:54 PM, Paul C. Anagnostopoulos via llvm-dev wrote:> 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? > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201007/4fef65c7/attachment.html>
On Wed, Oct 7, 2020 at 8:36 PM Neil Nelson via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 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> > Neil Nelson > > On 10/6/20 5:54 PM, Paul C. Anagnostopoulos via llvm-dev wrote: > > 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? > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Lerne, wie die Welt wirklich ist, aber vergiss niemals, wie sie sein sollte.