[PATCH] D113073: [lld-macho] Cache library paths from findLibrary
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 19 16:53:20 PST 2021
oontvoo added a comment.
In D113073#3120527 <https://reviews.llvm.org/D113073#3120527>, @smeenai wrote:
>
.... [cropped]
>>
>
> This is interesting. LLD has been at least 2x faster for us than ld64 (and also a bit faster than zld, which is a public ld64 fork with speed improvements), and I believe it was 3 to 4x faster for @thakis. You have some impressive ld64 improvements :)
>
> It's interesting that you have the large gap between parsing input files and the next trace. I haven't seen that on our end yet.
This is likely because for this particular app (actually also quite true for most of our apps), the input set is huge - it seems LLD pends most of its time blocking on disk-read.
By contrast, ld64 parses all input files up front in parallel. (same for archives - it all loads all members that it knows will be needed thanks to -ObjC /-all_load/-force_load).
(at least, some good news is, as shown below, LLD's cpu time is less than that of LD64 ;) - so it's efficient - just not as parallel as it could be)
SYSTEM CPU time:
x ./LD64_res2.txt
+ ./LLD_released_res2.txt
N Min Max Median Avg Stddev
x 5 1.84 2.01 1.9 1.916 0.065802736
+ 5 3.28 3.36 3.29 3.312 0.035637059
Difference at 95.0% confidence
1.396 +/- 0.0771735
72.8601% +/- 4.02785%
(Student's t, pooled s = 0.052915)
USER CPU time:
x ./LD64_res2.txt
+ ./LLD_released_res2.txt
N Min Max Median Avg Stddev
x 5 12.04 12.28 12.06 12.124 0.10644247
+ 5 5.51 5.66 5.54 5.562 0.060991803
Difference at 95.0% confidence
-6.562 +/- 0.126515
-54.1241% +/- 1.04351%
(Student's t, pooled s = 0.0867468)
WALL time:
x ./LD64_res2.txt
+ ./LLD_released_res2.txt
N Min Max Median Avg Stddev
x 5 12.42 12.59 12.54 12.516 0.064265076
+ 5 15.01 15.26 15.21 15.184 0.10139033
Difference at 95.0% confidence
2.668 +/- 0.123796
21.3167% +/- 0.989101%
(Student's t, pooled s = 0.0848823)
> I spent some time looking at the performance for loading inputs. Most of the time was going into parsing symbols and relocations, as expected.
do you have stats on how much time is spent in parsing relative to reloc handling?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113073/new/
https://reviews.llvm.org/D113073
More information about the llvm-commits
mailing list