Skip to content

Conversation

@original-brownbear
Copy link
Contributor

Removed one unnecessary sort (the shards are already sorted in the same order) and ported two more to JDK's list sort which beats Lucene's timsort by quite a margin nowadays (the mutations are done straight on the array backing the list and that saves endless indirection). Also, removed a needless intermediary to and from set copy and an unnecessary conditional.
This is all motivated by spacetime project benchmarking showing this stuff as one of the biggest contributors to search transport thread use.

Removed one unnecessary sort (the shards are already sorted in the same
order) and ported two more to JDK's list sort which beats Lucene's
timsort by quite a margin nowadays (the mutations are done straight on
the array backing the list and that saves endless indirection).
Also, removed a needless intermediary to and from set copy and an
unnecessary conditional.
This is all motivated by spacetime project benchmarking showing
this stuff as one of the biggest contributors to search transport
thread use.
@original-brownbear original-brownbear added >non-issue :Search Foundations/Search Catch all for Search Foundations labels Feb 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine elasticsearchmachine added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.1.0 labels Feb 25, 2025
Copy link
Contributor

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@original-brownbear
Copy link
Contributor Author

Thanks Chris!

@original-brownbear original-brownbear merged commit b90f374 into elastic:main May 6, 2025
17 checks passed
@original-brownbear original-brownbear deleted the remove-some-copies branch May 6, 2025 23:18
parkertimmins pushed a commit to parkertimmins/elasticsearch that referenced this pull request May 7, 2025
…astic#123426)

Removed one unnecessary sort (the shards are already sorted in the same order) and ported two more to JDK's list sort which beats Lucene's timsort by quite a margin nowadays (the mutations are done straight on the array backing the list and that saves endless indirection).
Also, removed a needless intermediary to and from set copy and an unnecessary conditional.
This is all motivated by spacetime project benchmarking showing
this stuff as one of the biggest contributors to search transport
thread use.
ywangd pushed a commit to ywangd/elasticsearch that referenced this pull request May 9, 2025
…astic#123426)

Removed one unnecessary sort (the shards are already sorted in the same order) and ported two more to JDK's list sort which beats Lucene's timsort by quite a margin nowadays (the mutations are done straight on the array backing the list and that saves endless indirection).
Also, removed a needless intermediary to and from set copy and an unnecessary conditional.
This is all motivated by spacetime project benchmarking showing
this stuff as one of the biggest contributors to search transport
thread use.
afoucret pushed a commit to afoucret/elasticsearch that referenced this pull request May 9, 2025
…astic#123426)

Removed one unnecessary sort (the shards are already sorted in the same order) and ported two more to JDK's list sort which beats Lucene's timsort by quite a margin nowadays (the mutations are done straight on the array backing the list and that saves endless indirection).
Also, removed a needless intermediary to and from set copy and an unnecessary conditional.
This is all motivated by spacetime project benchmarking showing
this stuff as one of the biggest contributors to search transport
thread use.
jfreden pushed a commit to jfreden/elasticsearch that referenced this pull request May 12, 2025
…astic#123426)

Removed one unnecessary sort (the shards are already sorted in the same order) and ported two more to JDK's list sort which beats Lucene's timsort by quite a margin nowadays (the mutations are done straight on the array backing the list and that saves endless indirection).
Also, removed a needless intermediary to and from set copy and an unnecessary conditional.
This is all motivated by spacetime project benchmarking showing
this stuff as one of the biggest contributors to search transport
thread use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants