[llvm] Introduce paged vector (PR #66430)

Giulio Eulisse via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 02:11:59 PDT 2023

ktf wrote:

@ChuanqiXu9 I have added a simple unit test, which has 100% code coverage as far as I can tell and covers the usecase the container will be used for.

@nikic This is in the context of improving the memory used when loading modules, in particular my usecase is the runtime overhead of the ROOT/cling C++ interpreter / I/O subsystem.

Without this patch, the initialisation of the system, which on startup loads a bunch of unneeded modules, grows to up 80 MB as you can see from:


With this patch applied, the total overhead goes down to 52MB:


As you can see the `ROOT::Internal::GetROOT2()` initialisation method goes from 67 to 30 MB (with some of the allocations which are now moved later on, due to the lazy allocation of the PagedVector).


More information about the llvm-commits mailing list