aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDisassembler/EDDisassembler.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-12 01:50:35 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-12 01:50:35 +0000
commitdae1dc1f01b3869e76a4e70d09dd597dffac6959 (patch)
treebdb1a1bbea1215fc2292e5d79019b57918a07d41 /llvm/lib/MC/MCDisassembler/EDDisassembler.h
parent1beec45a618b4613b27ab0e78fdfc89f0b035398 (diff)
downloadllvm-dae1dc1f01b3869e76a4e70d09dd597dffac6959.zip
llvm-dae1dc1f01b3869e76a4e70d09dd597dffac6959.tar.gz
llvm-dae1dc1f01b3869e76a4e70d09dd597dffac6959.tar.bz2
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(). llvm-svn: 127522
Diffstat (limited to 'llvm/lib/MC/MCDisassembler/EDDisassembler.h')
0 files changed, 0 insertions, 0 deletions