peterstace / simplefeatures

Simple Features is a pure Go Implementation of the OpenGIS Simple Feature Access Specification
MIT License
134 stars 19 forks source link

Minor `rtree` package cleanup #514

Closed peterstace closed 1 year ago

peterstace commented 1 year ago

Description

These are just some minor fixes that were identified while working on unrelated parts of the rtree package.

Check List

Have you:

Related Issue

Benchmark Results

As expected, no significant change to rtree benchmarks:

Click to expand ``` goos: linux goarch: arm64 pkg: github.com/peterstace/simplefeatures/rtree │ /tmp/tmp.h2TVSzQTMF │ /tmp/tmp.LGQyCW8iTK │ │ sec/op │ sec/op vs base │ Bulk/n=10-2 416.1n ± 0% 414.5n ± 1% -0.38% (p=0.044 n=15) Bulk/n=100-2 8.471µ ± 3% 8.469µ ± 3% ~ (p=0.467 n=15) Bulk/n=1000-2 185.4µ ± 1% 185.6µ ± 3% ~ (p=0.461 n=15) Bulk/n=10000-2 2.716m ± 0% 2.714m ± 1% ~ (p=0.412 n=15) Bulk/n=100000-2 30.57m ± 1% 30.54m ± 1% ~ (p=0.683 n=15) RangeSearch/n=10-2 10.40n ± 1% 10.35n ± 1% ~ (p=0.289 n=15) RangeSearch/n=100-2 43.03n ± 1% 43.01n ± 1% ~ (p=0.616 n=15) RangeSearch/n=1000-2 161.0n ± 0% 161.1n ± 1% ~ (p=0.959 n=15) RangeSearch/n=10000-2 571.7n ± 1% 572.1n ± 1% ~ (p=1.000 n=15) RangeSearch/n=100000-2 5.242µ ± 1% 5.225µ ± 1% ~ (p=0.661 n=15) geomean 5.092µ 5.086µ -0.12% │ /tmp/tmp.h2TVSzQTMF │ /tmp/tmp.LGQyCW8iTK │ │ B/op │ B/op vs base │ Bulk/n=10-2 1.031Ki ± 0% 1.031Ki ± 0% ~ (p=1.000 n=15) ¹ Bulk/n=100-2 14.03Ki ± 0% 14.03Ki ± 0% ~ (p=1.000 n=15) ¹ Bulk/n=1000-2 69.28Ki ± 0% 69.28Ki ± 0% ~ (p=1.000 n=15) ¹ Bulk/n=10000-2 1.083Mi ± 0% 1.083Mi ± 0% ~ (p=0.224 n=15) Bulk/n=100000-2 14.08Mi ± 0% 14.08Mi ± 0% ~ (p=0.483 n=15) RangeSearch/n=10-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=100-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=1000-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=10000-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=100000-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ geomean ² +0.00% ² ¹ all samples are equal ² summaries must be >0 to compute geomean │ /tmp/tmp.h2TVSzQTMF │ /tmp/tmp.LGQyCW8iTK │ │ allocs/op │ allocs/op vs base │ Bulk/n=10-2 6.000 ± 0% 6.000 ± 0% ~ (p=1.000 n=15) ¹ Bulk/n=100-2 70.00 ± 0% 70.00 ± 0% ~ (p=1.000 n=15) ¹ Bulk/n=1000-2 342.0 ± 0% 342.0 ± 0% ~ (p=1.000 n=15) ¹ Bulk/n=10000-2 5.462k ± 0% 5.462k ± 0% ~ (p=1.000 n=15) ¹ Bulk/n=100000-2 71.00k ± 0% 71.00k ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=10-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=100-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=1000-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=10000-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ RangeSearch/n=100000-2 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=15) ¹ geomean ² +0.00% ² ¹ all samples are equal ² summaries must be >0 to compute geomean ```
peterstace commented 1 year ago

Thanks for reviewing Albert 😁