diff options
author | Dhruv Chawla <44582521+dc03@users.noreply.github.com> | 2023-08-04 13:12:19 +0530 |
---|---|---|
committer | Dhruv Chawla <44582521+dc03@users.noreply.github.com> | 2023-08-15 22:37:18 +0530 |
commit | 7d950f040e3da66ec83f91b58d8c2220483d6335 (patch) | |
tree | 390c9eeb36a8cf7e3142d3dc19b78b1c9a94ba1d /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 39465350911ca3e4e6d0df522da3c92ec9d7e006 (diff) | |
download | llvm-7d950f040e3da66ec83f91b58d8c2220483d6335.zip llvm-7d950f040e3da66ec83f91b58d8c2220483d6335.tar.gz llvm-7d950f040e3da66ec83f91b58d8c2220483d6335.tar.bz2 |
[NFC][TLI] Replace std::lower_bound call in getLibFunc with DenseMap lookup
While std::lower_bound takes logarithmic time (relative to the length of
the array) to execute, DenseMap gives better performance characteristics
as it traverses few (if any) elements when collisions do occur,
especially when the number of elements are known in advance.
This gives a speedup of 0.24%:
https://llvm-compile-time-tracker.com/compare.php?from=ac00cca3d9c6c3e9118ebbe47aa5b3ba1ee7404f&to=7f3d4c8ce8cee3a236a2328e46b2a8374672b46e&stat=instructions:u
Differential Revision: https://reviews.llvm.org/D157951
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
0 files changed, 0 insertions, 0 deletions