erikbern / ann-benchmarks

Benchmarks of approximate nearest neighbor libraries in Python
http://ann-benchmarks.com
MIT License
4.88k stars 735 forks source link

【Why is the throughput of testing the same algorithm with raft ann benchmark one order of magnitude higher than using ann benchmark】 #532

Open zjx1230 opened 3 months ago

zjx1230 commented 3 months ago

Hello, Everyone! Recently, I tested the performance of hnswlib using raft-ann-benchmark and ann-benchmarks, and found that under the same recall rate, the QPS of raft-ann-benchmark is about an order of magnitude higher than that of ann-benchmarks. Is this due to the overhead of Python calling the cpp library when calculating time in ann-benchmarks?

environment: x86_64,CentOS7,96core raft-ann-benchmark command python -m raft-ann-bench.run --force --dataset glove-100-inner --algorithms hnswlib -m throughput

ann-benchmarks command python run.py --local --algorithm hnswlib --batch