[ https://issues.apache.org/jira/browse/LUCENE-9273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17056823#comment-17056823 ]
Ignacio Vera commented on LUCENE-9273: -------------------------------------- With this change, there is a speed up of LatLonShape query its over points because we are now only decoding two points instead of six: ||Approach||Shape||M hits/sec dev||M hits/sec base||M hits/sec diff||QPS dev||QPS base||QPS diff||Hit count dev||Hit count base||Hit count diff|| |shapes|polyRussia|9.32|8.51|10%|2.66|2.42|10%|3508846|3508846|0%| |shapes|polyMedium|3.59|3.27|10%|44.01|40.12|10%|2693559|2693559|0%| |shapes|poly 10|41.24|39.14|5%|26.08|24.75|5%|355809475|355809475|0%| |shapes|box|42.86|41.63|3%|43.62|42.36|3%|221118844|221118844|0%| |shapes|distance|42.94|41.80|3%|25.23|24.56|3%|382961957|382961957|0%| When indexing polygons, increase is very noticeable for intersect, within and disjoint: ||Approach||Shape||M hits/sec dev||M hits/sec base||M hits/sec diff||QPS dev||QPS base||QPS diff||Hit count dev||Hit count base||Hit count diff|| |point|intersects|0.00|0.00|-2%|319.39|324.38|-2%|2644|2644|0%| |box|intersects|6.04|5.95|2%|41.11|40.47|2%|33081264|33081264|0%| |distance|intersects|4.88|4.37|12%|17.15|15.36|12%|64062400|64062400|0%| |poly 10|intersects|4.08|3.17|29%|15.56|12.09|29%|59064569|59064569|0%| |polyMedium|intersects|0.32|0.21|50%|19.81|13.19|50%|528812|528812|0%| |polyRussia|intersects|1.00|0.64|56%|4.07|2.61|56%|244848|244848|0%| |point|contains|0.00|0.00|-1%|297.75|299.89|-1%|2644|2644|0%| |box|contains|0.00|0.00|1%|37.70|37.31|1%|484|484|0%| |distance|contains|0.00|0.00|1%|17.70|17.48|1%|406|406|0%| |poly 10|contains|0.00|0.00|-1%|14.80|14.97|-1%|402|402|0%| |polyMedium|contains|0.00|0.00|0%|15.47|15.47|0%|147|147|0%| |point|within|0.00|0.00|0%|329.08|335.04|-2%|0|0|0%| |box|within|0.51|0.43|18%|3.49|2.95|18%|32911251|32911251|0%| |distance|within|0.91|0.76|20%|3.20|2.67|20%|63868270|63868270|0%| |poly 10|within|0.81|0.77|4%|3.08|2.95|4%|58873224|58873224|0%| |polyMedium|within|0.05|0.05|12%|3.39|3.03|12%|522739|522739|0%| |polyRussia|within|0.61|0.51|18%|2.49|2.10|18%|244661|244661|0%| |point|disjoint|264.00|264.97|-0%|20.05|20.13|-0%|2962178156|2962178156|0%| |box|disjoint|184.56|184.75|-0%|14.18|14.19|-0%|2929099536|2929099536|0%| |distance|disjoint|124.87|117.81|6%|9.69|9.15|6%|2898118400|2898118400|0%| |poly 10|disjoint|119.71|101.56|18%|9.28|7.87|18%|2903116231|2903116231|0%| |polyMedium|disjoint|135.92|109.35|24%|10.34|8.32|24%|433924372|433924372|0%| |polyRussia|disjoint|49.06|31.78|54%|3.80|2.46|54%|12920400|12920400|0%| > Speed up geometry queries by specialising Component2D spatial operations > ------------------------------------------------------------------------ > > Key: LUCENE-9273 > URL: https://issues.apache.org/jira/browse/LUCENE-9273 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Ignacio Vera > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > This is a follow-up from an observation of [~jpountz] where it notice that > regardless of the spatial operation we are executing (e.g Intersects), we are > always calling the method component2D#relateTriangle which it would be less > expensive if we have an specialise method for intersects. > The other frustrating thing is that regardless of the type of triangle we are > dealing with, we are decoding all points of the triangle. In addicting most > of the implementation of component2D#relateTriangle contain code that check > the type of triangle to then call specialise methods. > In this issue it is proposed to replace the method component2D#relateTriangle > by the following methods: > component2D#intersectsTriangle > component2D#intersectsLine > component2D#containsTriangle > component2D#containsLine > For consistency we add as well the methods: > component2D#withinPoint > component2D#withinLine > Finally, the resolution of the triangle type his added to the decoding of the > triangle. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org