antirez / antirez/rax

raxLowWalk , divide and conquer instead of linear scan

Đang mở
#24 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
1.3k
Fork
177
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

what about something like:
int bleh = h->size;
do{
bleh/=2;
if (v[j] < s[i])
{
j+=bleh;
}
else if (v[j] > s[i])
{
j-=bleh;
}
else
{
//got hit
}
}while (bleh>1);

divide and conquer scanning instead of linear?

/* Even when h->size is large, linear scan provides good
* performances compared to other approaches that are in theory
* more sounding, like performing a binary search. */
for (j = 0; j < h->size; j++) {
if (v[j] == s[i]) break;
}

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.