diff options
author | antirez <antirez@gmail.com> | 2015-07-01 16:12:08 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-07-01 16:12:08 +0200 |
commit | 4160bf0448e93e25607f844a149b1418e3fa3dd4 (patch) | |
tree | 7a9d9f776275ec4c2545360e9603b5ff93a7208f /src | |
parent | d308cadc8a18fe8aea41898d8d881f91103617a0 (diff) | |
download | redis-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |