[PATCH] D117644: [ELF] Remove StringRefZ
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 00:45:22 PST 2022
MaskRay created this revision.
MaskRay added reviewers: ikudrin, peter.smith.
Herald added subscribers: pengfei, arichardson, emaste.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
StringRefZ does not improve performance. Non-local symbols always have eagerly
computed lengths. Most local symbols's lengths will be updated in either:
- shouldKeepInSymtab
- SymbolTableBaseSection::addSymbol
Its benefit is offseted by strlen in every call site (5KiB code in a release
x86-64 build), so using StringRefZ may be slower.
In a -s link (uncommon) there is minor speedup, like ~0.3% for clang and chrome.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117644
Files:
lld/ELF/InputFiles.cpp
lld/ELF/Symbols.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117644.401122.patch
Type: text/x-patch
Size: 4695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220119/57f4a7a8/attachment.bin>
More information about the llvm-commits
mailing list