[clang] [NFC][clang][AST] Add compile-time dispatch for random access iterators in append() (PR #162000)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 5 01:18:51 PDT 2025
================
@@ -192,9 +204,11 @@ class ASTVector {
this->grow(C, this->size()+NumInputs);
// Copy the new elements over.
- // TODO: NEED To compile time dispatch on whether in_iter is a random access
- // iterator to use the fast uninitialized_copy.
----------------
zwuis wrote:
Is the comment correct? Can you confirm that `std::distance` and `std::uninitialized_copy` do NOT perform compile time dispatch? How is `std::uninitialized_copy_n` faster here?
https://github.com/llvm/llvm-project/pull/162000
More information about the cfe-commits
mailing list