Skip to content

raxLowWalk , divide and conquer instead of linear scan #24

@anunique

Description

@anunique

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;
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions