Skip to content

Commit

Permalink
use faster geohash encode/decode implementation from @Steve132 for Ge…
Browse files Browse the repository at this point in the history
…oAdd/GeoSearch commands
  • Loading branch information
yinqiwen committed Sep 16, 2014
1 parent 607de94 commit 43f4bad
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 87 deletions.
2 changes: 1 addition & 1 deletion src/command/geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace ardb
break;
}
GeoHashBits hash;
geohash_encode(&lat_range, &lon_range, point.y, point.x, 30, &hash);
geohash_fast_encode(lat_range, lon_range, point.y, point.x, 30, &hash);
GeoHashFix60Bits score = hash.bits;
Data score_value;
score_value.SetInt64((int64) score);
Expand Down
1 change: 0 additions & 1 deletion src/command/t_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ OP_NAMESPACE_BEGIN
FindElementByRedisCursor(cursor, scan_start_element);
}
}
bool reachend = false;
HashIter(ctx, meta, scan_start_element, iter, true);
std::string tmpelement;
while (iter.Valid())
Expand Down
Loading

0 comments on commit 43f4bad

Please sign in to comment.