Kontinuation opened a new pull request, #261:
URL: https://github.com/apache/sedona-db/pull/261

   Ported changes are mostly for optimizing intersects:
   
   * https://github.com/georust/geo/pull/1368
   * https://github.com/georust/geo/pull/1376
   * https://github.com/georust/geo/pull/1377
   * https://github.com/georust/geo/pull/1378
   * https://github.com/georust/geo/pull/1379
   * https://github.com/georust/geo/pull/1364
   
   We observed performance improvements after applying these patches. Now the 
performance of sedona-geo-generic-alg is on par with the upstream georust/geo:
   
   ```
   Benchmarking MultiPolygon intersects: Warming up for 3.0000 s
   Warning: Unable to complete 10 samples in 5.0s. You may wish to increase 
target time to 7.8s or enable flat sampling.
   MultiPolygon intersects time:   [141.71 ms 141.91 ms 142.08 ms]
                           change: [-54.400% -54.242% -54.080%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 2 outliers among 10 measurements (20.00%)
     1 (10.00%) low mild
     1 (10.00%) high mild
   
   Benchmarking MultiPolygon intersects 2: Warming up for 3.0000 s
   Warning: Unable to complete 10 samples in 5.0s. You may wish to increase 
target time to 7.8s or enable flat sampling.
   MultiPolygon intersects 2
                           time:   [141.70 ms 141.93 ms 142.25 ms]
                           change: [-58.568% -58.385% -58.220%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 1 outliers among 10 measurements (10.00%)
     1 (10.00%) high severe
   
   Benchmarking MultiPolygon intersects geo: Warming up for 3.0000 s
   Warning: Unable to complete 10 samples in 5.0s. You may wish to increase 
target time to 7.1s or enable flat sampling.
   MultiPolygon intersects geo
                           time:   [129.15 ms 129.41 ms 129.97 ms]
                           change: [-1.3094% -0.3470% +0.5022%] (p = 0.52 > 
0.05)
                           No change in performance detected.
   Found 2 outliers among 10 measurements (20.00%)
     2 (20.00%) high severe
   
   Benchmarking MultiPolygon intersects geo 2: Warming up for 3.0000 s
   Warning: Unable to complete 10 samples in 5.0s. You may wish to increase 
target time to 7.4s or enable flat sampling.
   MultiPolygon intersects geo 2
                           time:   [132.93 ms 133.14 ms 133.48 ms]
                           change: [-0.8341% -0.3690% +0.0761%] (p = 0.15 > 
0.05)
                           No change in performance detected.
   Found 1 outliers among 10 measurements (10.00%)
     1 (10.00%) high mild
   
   Benchmarking MultiPolygon intersects wkb: Warming up for 3.0000 s
   Warning: Unable to complete 10 samples in 5.0s. You may wish to increase 
target time to 8.2s or enable flat sampling.
   MultiPolygon intersects wkb
                           time:   [149.24 ms 149.39 ms 149.68 ms]
                           change: [-58.540% -57.965% -57.446%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 2 outliers among 10 measurements (20.00%)
     2 (20.00%) high severe
   
   Benchmarking MultiPolygon intersects wkb aligned: Warming up for 3.0000 s
   Warning: Unable to complete 10 samples in 5.0s. You may wish to increase 
target time to 8.2s or enable flat sampling.
   MultiPolygon intersects wkb aligned
                           time:   [149.49 ms 149.72 ms 150.02 ms]
                           change: [-57.996% -57.703% -57.440%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 1 outliers among 10 measurements (10.00%)
     1 (10.00%) high severe
   
   Benchmarking MultiPolygon intersects wkb conv: Warming up for 3.0000 s
   Warning: Unable to complete 10 samples in 5.0s. You may wish to increase 
target time to 9.5s or enable flat sampling.
   MultiPolygon intersects wkb conv
                           time:   [170.85 ms 171.65 ms 173.49 ms]
                           change: [-49.706% -49.261% -48.785%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 2 outliers among 10 measurements (20.00%)
     2 (20.00%) high severe
   
   Rect intersects         time:   [27.692 µs 27.815 µs 27.954 µs]
                           change: [-10.597% -9.9531% -9.3407%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) high mild
   
   LineString above Polygon
                           time:   [42.070 ns 42.183 ns 42.319 ns]
                           change: [-41.140% -40.905% -40.678%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 13 outliers among 100 measurements (13.00%)
     7 (7.00%) high mild
     6 (6.00%) high severe
   
   LineString above Triangle
                           time:   [37.656 ns 37.710 ns 37.776 ns]
                           change: [-67.119% -66.992% -66.880%] (p = 0.00 < 
0.05)
                           Performance has improved.
   
   LineString around Rectangle
                           time:   [39.998 ns 40.141 ns 40.274 ns]
                           change: [-30.674% -30.411% -30.118%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 2 outliers among 100 measurements (2.00%)
     2 (2.00%) high mild
   
   long disjoint           time:   [4.5585 ms 4.5801 ms 4.6157 ms]
                           change: [-41.478% -41.120% -40.611%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 12 outliers among 100 measurements (12.00%)
     3 (3.00%) high mild
     9 (9.00%) high severe
   
   ls within poly          time:   [13.420 ns 13.458 ns 13.501 ns]
                           change: [-62.796% -62.671% -62.536%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 3 outliers among 100 measurements (3.00%)
     3 (3.00%) high mild
   
   ls within rect          time:   [865.31 ps 867.20 ps 869.17 ps]
                           change: [-77.619% -77.544% -77.467%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 2 outliers among 100 measurements (2.00%)
     1 (1.00%) high mild
     1 (1.00%) high severe
   
   Point intersects rect   time:   [31.254 µs 31.362 µs 31.495 µs]
                           change: [+1.5134% +2.1800% +2.8175%] (p = 0.00 < 
0.05)
                           Performance has regressed.
   Found 5 outliers among 50 measurements (10.00%)
     2 (4.00%) high mild
     3 (6.00%) high severe
   
   Point intersects triangle
                           time:   [51.201 ms 51.340 ms 51.507 ms]
                           change: [-21.835% -21.424% -21.020%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 4 outliers among 50 measurements (8.00%)
     4 (8.00%) high severe
   
   Triangle intersects point
                           time:   [7.3176 ns 7.3347 ns 7.3549 ns]
                           change: [-2.7754% -2.3862% -2.0256%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 6 outliers among 50 measurements (12.00%)
     4 (8.00%) high mild
     2 (4.00%) high severe
   
   Triangle intersects point on edge
                           time:   [15.252 ns 15.271 ns 15.294 ns]
                           change: [-1.5220% -1.1374% -0.7697%] (p = 0.00 < 
0.05)
                           Change within noise threshold.
   Found 5 outliers among 50 measurements (10.00%)
     4 (8.00%) high mild
     1 (2.00%) high severe
   
   Benchmarking Point polygon intersects: Warming up for 3.0000 s
   Warning: Unable to complete 50 samples in 5.0s. You may wish to increase 
target time to 7.6s, enable flat sampling, or reduce sample count to 20.
   Point polygon intersects
                           time:   [5.9300 ms 5.9401 ms 5.9529 ms]
                           change: [-0.1076% +0.3396% +0.7799%] (p = 0.14 > 
0.05)
                           No change in performance detected.
   Found 6 outliers among 50 measurements (12.00%)
     3 (6.00%) high mild
     3 (6.00%) high severe
   
   Benchmarking Point polygon intersects geo: Warming up for 3.0000 s
   Warning: Unable to complete 50 samples in 5.0s. You may wish to increase 
target time to 7.6s, enable flat sampling, or reduce sample count to 20.
   Point polygon intersects geo
                           time:   [5.9395 ms 5.9632 ms 5.9992 ms]
                           change: [+0.7289% +1.3617% +2.1782%] (p = 0.00 < 
0.05)
                           Change within noise threshold.
   Found 2 outliers among 50 measurements (4.00%)
     1 (2.00%) high mild
     1 (2.00%) high severe
   
   Benchmarking Point polygon intersects wkb: Warming up for 3.0000 s
   Warning: Unable to complete 50 samples in 5.0s. You may wish to increase 
target time to 9.5s, enable flat sampling, or reduce sample count to 20.
   Point polygon intersects wkb
                           time:   [7.4118 ms 7.4331 ms 7.4591 ms]
                           change: [-0.1375% +0.3810% +0.8415%] (p = 0.15 > 
0.05)
                           No change in performance detected.
   Found 5 outliers among 50 measurements (10.00%)
     4 (8.00%) high mild
     1 (2.00%) high severe
   
   Point polygon intersects wkb conv
                           time:   [32.824 ms 32.901 ms 32.989 ms]
                           change: [+0.2233% +0.5778% +0.9195%] (p = 0.00 < 
0.05)
                           Change within noise threshold.
   Found 6 outliers among 50 measurements (12.00%)
     4 (8.00%) high mild
     2 (4.00%) high severe
   
   ```
   
   Distance computation uses intersects internally, so the performance of 
distance computation should be improved theoretically. However, I have not 
observed performance improvements by running the distance bench, probably 
because it only involves simple shapes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to