diff options
author | Min-Yih Hsu <min.hsu@sifive.com> | 2024-01-12 16:34:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 16:34:39 -0800 |
commit | 3edf82d5566ed5c9898f52b5591c05f6366d6bac (patch) | |
tree | 86484c5b16360cc13ff1054ae908313b28c74b45 /llvm/docs/tutorial | |
parent | 5ca2d75f2046612978ba71c4b36714b2a0a01886 (diff) | |
download | llvm-3edf82d5566ed5c9898f52b5591c05f6366d6bac.zip llvm-3edf82d5566ed5c9898f52b5591c05f6366d6bac.tar.gz llvm-3edf82d5566ed5c9898f52b5591c05f6366d6bac.tar.bz2 |
[XRay] Reserve memory space ahead-of-time when reading native format log (#76853)
XRay used to struggle reading large log files. It turned out the
bottleneck was primarily caused by the reallocation happens when
appending log entries into a std::vector.
This patch reserves the memory space ahead-of-time since the number of
entries is known for most cases. Making llvm-xray runs 1.8 times faster
and uses 1.4 times less physical memory when reading large (~2.6GB) log
files.
Diffstat (limited to 'llvm/docs/tutorial')
0 files changed, 0 insertions, 0 deletions