rsmith added a comment.

Taking a step back for a moment: what is the intended use case for this? My 
concern is that most of the time you're going to want to make O(N) such queries 
into a pack of N elements, resulting in O(N^2) compile time, much like we 
regrettably get from uses of `__type_pack_element`. If we can avoid the regret 
in this case by providing a different intrinsic, perhaps we should do so. (For 
example, we could take two packs of types, and produce a sequence of integers 
giving the indexes of each of the first types in the second list, in O(N) time. 
And similarly we could add a `__type_pack_elements` that takes a pack of types 
and a pack of indexes and performs N indexing operations at once, in O(N) time, 
rather than having the program do it in O(N^2) time.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151952/new/

https://reviews.llvm.org/D151952

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to