summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-07-01 16:12:08 +0200
committerantirez <antirez@gmail.com>2015-07-01 16:12:08 +0200
commit4160bf0448e93e25607f844a149b1418e3fa3dd4 (patch)
tree7a9d9f776275ec4c2545360e9603b5ff93a7208f /src
parentd308cadc8a18fe8aea41898d8d881f91103617a0 (diff)
downloadredis-4160bf0448e93e25607f844a149b1418e3fa3dd4.tar.gz
Geo: sync faster decoding from krtm that synched from Ardb.
Instead of successive divisions in iteration the new code uses bitwise magic to interleave / deinterleave two 32bit values into a 64bit one. All tests still passing and is measurably faster, so worth it.
Diffstat (limited to 'src')
-rw-r--r--src/geo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/geo.c b/src/geo.c
index 66c17a111..b56711123 100644
--- a/src/geo.c
+++ b/src/geo.c
@@ -164,7 +164,7 @@ double extractDistanceOrReply(redisClient *c, robj **argv,
* than "5.2144992818115 meters away." We provide 4 digits after the dot
* so that the returned value is decently accurate even when the unit is
* the kilometer. */
-inline void addReplyDoubleDistance(redisClient *c, double d) {
+void addReplyDoubleDistance(redisClient *c, double d) {
char dbuf[128];
int dlen = snprintf(dbuf, sizeof(dbuf), "%.4f", d);
addReplyBulkCBuffer(c, dbuf, dlen);