Same as MC-268417. I appreciate that you can sort entities by distance but why does Minecraft use the Bogosort algorithm? This algorithm is very inefficient unless you are lucky.
To reproduce just run a command with [c=10] like for example /say @e[c=10] multiple times.
Observed Results: The time how long it takes to sort the entities will be random.
Expected Results: The time how long it takes to sort the entities is not random.
Linked issues
relates to
Comments


Your report does not contain enough information to understand or reproduce the problem.
In general, the time required for any sort will depend on the number of items to be sorted.
This appears to be more a feedback report than a bug report.
Please add the following information to the Description, as shown here:
Steps to Reproduce:
1. (list every step carefully, so someone else can reproduce the issue)
2.
3.
Observed Results:
(briefly describe what you see happen, including any message(s) shown)
Expected Results:
(briefly describe what should happen)
Try following your steps to make sure you include everything and can still reproduce the issue yourself.
Use screenshots or video to help explain (but not replace) the above information
This report has been temporarily resolved as Awaiting Response. It will automatically reopen when you add information. Please follow the format shown and include all sections (steps, observed, expected). Reports that do not contain all of the requested information and complete steps to reproduce the issue may be closed as Incomplete. For more information please read the Bug Tracker Guidelines.
Many players find this Bug Report Creation Form useful for filling in all helpful information.

My statement from MC-268417 partially applies here: If Minecraft would use Bogosort, then running /say @e[c=100] should take longer than the heat death of the universe. However, as one can observe, it does not take that long and is done almost instantly.

How are you actually "timing" these commands?
How long are they taking to complete for you?
Please include this information in the list of steps to reproduce the issue and results sections.
Depending on the sorting algorithm, the time to complete is not necessarily always the same, but that is not a reason to assume that a "bogosort" or any other specific method is being used.

How are you actually "timing" these commands?
How long are they taking to complete for you?
Please include this information in the list of steps to reproduce the issue and results sections.
Depending on the sorting algorithm, the time to complete is not necessarily always the same, but that is not a reason to assume that a "bogosort" or any other specific method is being used.

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Your report does not contain enough information to understand or reproduce the problem.
In general, the time required for any sort will depend on the number of items to be sorted.
This appears to be more a feedback report than a bug report.
Please add the following information to the Description, as shown here:
Try following your steps to make sure you include everything and can still reproduce the issue yourself.
Use screenshots or video to help explain (but not replace) the above information
This report has been temporarily resolved as Awaiting Response. It will automatically reopen when you add information. Please follow the format shown and include all sections (steps, observed, expected). Reports that do not contain all of the requested information and complete steps to reproduce the issue may be closed as Incomplete. For more information please read the Bug Tracker Guidelines.
Many players find this Bug Report Creation Form useful for filling in all helpful information.