3 ms·
I benchmarked it. My binary search using ZRANGE was fast, but not as fast as your normalized method: Ran 10000 queries in 26.52s using bsearch Ran 1000
by bl4k 16y ago
I benchmarked it. My binary search using ZRANGE was fast, but not as fast as your normalized method:
Ran 10000 queries in 26.52s using bsearch
Ran 10000 queries in 3.87s using normalized method
the advantage in using the bsearch is that you have a clean data set, incase you use that set in other parts, and it is easier to manage the data.
- antirez 16y agoHello! like in most Redis benchmarks, without concurrent clients you are measuring latency in this way, not real performances! You need to spawn N threads, and if you do it the wrong way (N ruby scripts for instance) you'll not be ale to actual meter the performance as the clients will use all the CPU... I think the normalized method is faster indeed but it's not possible to tell from this benchmark.