Skip to content
Snippets Groups Projects
Commit d468346e authored by Axel Naumann's avatar Axel Naumann
Browse files

[cling] Unroll the pointer-check cache loop.

parent 08e9833a
No related branches found
No related tags found
No related merge requests found
......@@ -70,8 +70,9 @@ namespace {
bool operator () (const void* P) {
if (FD == -1)
return false;
if (std::find(lines.begin(), lines.end(), P) != lines.end())
// std::find is considerably slower, do manual search instead.
if (P == lines[0] || P == lines[1] || P == lines[2] || P == lines[3]
|| P == lines[4] || P == lines[5] || P == lines[6] || P == lines[7])
return true;
// There is a POSIX way of finding whether an address
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment