diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-12 01:50:35 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-12 01:50:35 +0000 |
commit | 55768d763d3d955c07d5819c3ef2e9d1ca6d2baf (patch) | |
tree | 9ba913d3af1620e2a8e39ca7efe300c51f19a677 /lib/MC/MCDisassembler/EDDisassembler.h | |
parent | 8b3000b08ee583bedfa8baebd4fcfd92e9a201c7 (diff) |
That's it, I am declaring this a failure of the C++03 STL.
There are too many compatibility problems with using mixed types in
std::upper_bound, and I don't want to spend 110 lines of boilerplate setting up
a call to a 10-line function. Binary search is not /that/ hard to implement
correctly.
I tried terminating the binary search with a linear search, but that actually
made the algorithm slower against my expectation. Most live intervals have less
than 4 segments. The early test against endIndex() does pay, and this version is
25% faster than plain std::upper_bound().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDisassembler/EDDisassembler.h')
0 files changed, 0 insertions, 0 deletions