I usually ask AI to summarize it and then I get a pretty good idea of what it was meant to do. It’s just another tool to me. AI generated code sucks but it’s nice when it’s a quick summary.
- 0 Posts
- 3 Comments
Joined 2 years ago
Cake day: August 24th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
Acters@lemmy.worldto Ask Lemmy@lemmy.world•How do I stop thinking about how many hours there are left on the weekend?1·1 month agoYou should try to min-max your weekend but instead shift what your expectations are for the min-max. Planning ahead of the weekend is good to reduce anxiety over what you are doing at each minute of the weekend. You plan it out and stick to it. If something comes up that fucks the plan up, then simply it was just not meant to be. Do plan out moments where you are resting too, because if you are planning to do tasks, then you should plan when there is a clear time to rest. Usually tasks happen between times of rest. So plan those rest times accordingly, as those are the only moments when your body can repair and do what it needs to do to keep you healthy. Good luck
Glibc’s qsort will default to either insertion sort mergesort or heapsort. Quicksort itself is used when it cannot allocate extra memory for mergesort or heapsort. Insertion sort is still used in the quicksort code, when there is a final 4 items that need to be sorted.
Normally it is simply mergesort or heapsort. Why I know this? Because there was a recent CVE for quicksort and to reproduce the bug I had to force memory to be unable to be allocated with a max size item. It was interesting reading the source code.
That is if you are not on a recent version of qsort which simply removed quicksort altogether for the mergesort + heapsort
Older version still had quicksort and even some had insertion sort. Its interesting to look at all the different versions of qsort.