[PATCH] D42176: [WebAssembly] Optimise relocation iteration to remove n^2 loop (LLD)
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 15:44:15 PST 2018
ruiu added a comment.
Somewhat orthogonal to this patch, but one of the reasons why lld is so fast is that it doesn't only avoid expensive algorithms such as O(n^2) or O(log n) but also avoids even hash table lookups, though it's O(1). Loading something through two-levels of pointer indirection is very fast, but obtaining the same information through a hash table can be very expensive, as the amount of data the linker has to deal with is huge. Maybe I should write a document about that somewhere in the lld repository, but please keep in mind that that's one of the design principles.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D42176
More information about the llvm-commits
mailing list