[clang] Introduce paged vector (PR #66430)

Jakub Kuderski via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 11:32:34 PDT 2023


kuhar wrote:

A few more questions @ktf:
1. Would it be possible to add a benchmark that compares this paged vector to `std::vector` and `llvm::SmallVector` for a few data types? Maybe `int`, `std::string`, `std::vector<int>`. I would love to see what the performance characteristics are like. We have a few existing benchmarks (with google benchmark) in the source tree that you could start with.
2. Could we benefits from not initializing elements on resize and only on the first page access? I guess this would require a tri-state for `Lookup`.
3. Would it be possible to get a similar speedup by providing a custom allocator to `std::vector`?
4. Are there some alternative data structures that could work in your use case?

https://github.com/llvm/llvm-project/pull/66430


More information about the cfe-commits mailing list