-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFC: Provide selection methods based on internal iteration (#164)
- [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `rstar/CHANGELOG.md` if knowledge of this change could be valuable to users. --- This avoids the overhead of allocating an internal buffer to keep track of upcoming nodes when implementing the `Iterator` trait. I also found a mistake in the old code from #37 (lack of early return in the parent case) and now the benchmarks also look somewhat nicer, i.e. directly comparing internal and external iteration on the same data set: ```console locate_at_point (successful) time: [115.62 ns 116.51 ns 117.43 ns] locate_at_point_int (successful) time: [66.831 ns 67.264 ns 67.653 ns] locate_at_point (unsuccessful) time: [167.70 ns 168.03 ns 168.34 ns] locate_at_point_int (unsuccessful) time: [167.90 ns 168.28 ns 168.64 ns] ``` Closes #163
- Loading branch information
1 parent
f81b9a0
commit 7f8f63a
Showing
4 changed files
with
256 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ version = "0.1.1" | |
authors = ["Stefan Altmayer <[email protected]>", "The Georust Developers <[email protected]>"] | ||
|
||
[dev-dependencies] | ||
criterion = { version = "0.4.0", features = ["html_reports"] } | ||
geo = "0.26.0" | ||
geo-types = { version = "0.7.9", features = ["use-rstar_0_10"] } | ||
rand = "0.7" | ||
rand_hc = "0.2" | ||
criterion = { version = "0.5.0", features = ["html_reports"] } | ||
geo = "0.28.0" | ||
geo-types = { version = "0.7.9", features = ["use-rstar_0_12"] } | ||
rand = "0.8" | ||
rand_hc = "0.3" | ||
rstar = { path = "../rstar" } | ||
|
||
[[bench]] | ||
|
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
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