Skip to content

GEO commands should use the addReplyDouble API and not the addReplyDoubleDistance which is more expensive and lacks precision #11525

@filipecosta90

Description

@filipecosta90

Given we've optimized the addReplyDouble API in # and after doing a quick benchamrk as follows:

memtier_benchmark -c 10 -t 2 --pipeline 10 --test-time 60 --command "GEODIST key element1 element2" --hide-histogram

We can see that the majority of the CPU cycles within GEODIST are for snprintf. out the 30% cpu-cycles of GEODIST, 20% are for snprintf.
image

Therefore I suggest we standardize the distance reply which will not only benefit approximate elements distance computation but also reduce the overhead of double to string conversion of the distance between points in the reply.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions