-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
geodist: use Point struct instead of a Point interface
Getting an Edge is expensive as the generating a Point that complies with the geodist.Point interface involves mallocing from memory. We call Edge(x) a lot when doing POLYGON <=> POLYGON comparisons. Instead, change the Point to a struct, which does not require any malloc to generate interfaces at the cost of code ugliness. Without bounding box checks, this speeds up a query from 2min to 1min30sec on a ~120000 row join. Release note: None
- Loading branch information
Showing
3 changed files
with
89 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.