this post was submitted on 17 Aug 2024
94 points (97.0% liked)

Asklemmy

44151 readers
2350 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_[email protected]~

founded 5 years ago
MODERATORS
 

I haven't seen a thread on this in a while. I have been going with top day for a while, but it can be hit or miss. Other sorts don't seem to display as good in terms of balancing quality and quantity. What is your preferred sort for your main feed?

Edit: Realizing that the people who sort new commented before the hot/top/active people, haha

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 17 points 4 months ago (1 children)

quick sort on random input, insertion sort on almost-sorted inputs

[โ€“] [email protected] -5 points 4 months ago (1 children)

Honestly, sorting algos are serious nerd shit. They're for suckers and losers. If it's not worth doing, insertion sort every day of the week. Compute is cheap. If it's actually important, then it's TimSort (it's never important).

[โ€“] ralakus 4 points 4 months ago

In small datasets, the speed difference is minimal; but, once you get to large datasets with hundreds of thousands to millions of entries they do make quite a difference. For example, you're a large bank with millions of clients, and you want to get a list of the people with the most money in an account. Depending on the sorting algorithm used, the processing time could range from seconds to days. That's also only one operation, there's so much other useful information that could be derived from a database like that using sorting.