About the performance in my test.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 5k
- Forks
- 622
- Avg merge
- 8h 37m
- Merged PRs (30d)
- 5
Description
Hey, thanks for this great project.
I wanna use this algorithm in face feature search, I tried another algorithm called hnswlib, this is also fast, but static, cannot delete.
So I compare three methods: SPTAG.AnnIndex("BKT"), hnswlib and brutoforce search (np.argmax).
Following table is each method's cost time. All are querying 1000 features' 3 most similar features in 26458 fetures.
| algorithm | SPTAG.AnnIndex("BKT") | hnswlib | brutoforce search |
|---|---|---|---|
| cost time(ms) | 3837.684 | 177.665 | 3636.569 |
As the table shows, SPTAG.AnnIndex("BKT") is not faster than brutoforce search, don't get spped up.
This is my SPTAG.AnnIndex("BKT") test code:
@calc_time
def testSearch(index, q, k):
j = SPTAG.AnnIndex.Load(index)
_t0 = datetime.now()
for t in range(q.shape[0]):
result = j.Search(q[t].tobytes(), k)
_t1 = datetime.now()
print("Search time is {} ms".format(1000*(_t1-_t0).total_seconds()))
I don't know if this is normal, or my test code is wrong?
Thank you.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported testSearch snippet and the SPTAG.AnnIndex("BKT") Load and Search entry points. Reproduce the comparison using the stated 1,000 queries and 26,458 features, then determine whether the timing is expected or reflects the test setup; done means documenting the cause and any needed benchmark correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100