Unroll the pointer-check cache loop.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user