changed addReplyHumanLongDouble to addReplyDouble in georadiusGeneric and geoposCommand (#13494)

# Summary 

- Addresses https://github.com/redis/redis/issues/11565
- Measured improvements of 30% and 37% on the simple use-case (GEOSEARCH
and GEOPOS) (check
https://github.com/redis/redis/pull/13494#issuecomment-2313668934), and
of 66% on a dataset with >60M datapoints and pipeline 10 benchmark.
This commit is contained in:
Filipe Oliveira (Redis) 2024-09-03 13:54:20 +01:00 committed by GitHub
parent d3d94ccf2e
commit fb8755a636
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -796,8 +796,8 @@ void georadiusGeneric(client *c, int srcKeyIndex, int flags) {
if (withcoords) {
addReplyArrayLen(c, 2);
addReplyHumanLongDouble(c, gp->longitude);
addReplyHumanLongDouble(c, gp->latitude);
addReplyDouble(c,gp->longitude);
addReplyDouble(c,gp->latitude);
}
}
} else {
@ -959,8 +959,8 @@ void geoposCommand(client *c) {
continue;
}
addReplyArrayLen(c,2);
addReplyHumanLongDouble(c,xy[0]);
addReplyHumanLongDouble(c,xy[1]);
addReplyDouble(c,xy[0]);
addReplyDouble(c,xy[1]);
}
}
}