fix(apache#15309): Optimize PriorityQueue.remove() function#15331
fix(apache#15309): Optimize PriorityQueue.remove() function#15331vijaykriishna wants to merge 1 commit into
Conversation
|
PQs are so heavily used in Lucene that any extra cost added to add() will be probably a no-no. Can you run the benchmarks and see how it affects performance? |
39b0a7e to
50bd4bb
Compare
|
I don't think any code actually uses remove...I don't think making it faster is worth making anything else more expensive. |
|
@dweiss @benwtrent Are you suggesting to get rid of |
|
Hence, felt to not remove it altogether. |
|
@vijaykriishna I would much prefer the single use gets optimized than adding cost to the priority queue to everything. |
|
Yes, I think we should remove it. It's only used in one place and this place could probably do away with something else instead. |
|
@vijaykriishna if you'd like to continue - feel free to review DiversifiedTopDocsCollector to see if it can be implemented in a different way, then nuke that remove method from the PriorityQueue class! I'll be away this week but it'd be great to push this forward. |
|
Superseded by #15493 |
Description