News for hackers. Stuff that matters.
Re:FreeBSD replaces bubblesort with mergesort on SYSINTs, re... by trostaft on Monday August 21, 2023 @12:30AM (#37205510)
The Wikipedia article is pretty good, but tldr: "the overall performance improvement gained by optimizing a single part of a system is limited by the fraction of time that the improved part is actually used."

https://en.wikipedia.org/wiki/Amdahl%27s_law

Usually used in the parallel computing context, but works here too.

Re:FreeBSD replaces bubblesort with mergesort on SYSINTs, re... by bombcar on Monday August 21, 2023 @12:33AM (#37205525)
So if you have something that takes 1 second out of 10 seconds, you can't improve the overall system more than 1 second (by removing it entirely).
Re:FreeBSD replaces bubblesort with mergesort on SYSINTs, re... by astrange on Monday August 21, 2023 @06:29AM (#37207557)
That's not true, because in addition to taking 1 second it could be emptying all your caches. Performance isn't just adding up wallclock times.
Re:FreeBSD replaces bubblesort with mergesort on SYSINTs, re... by robocat on Monday August 21, 2023 @04:00AM (#37206604)
Same thing happens when driving - your trip duration usually depends on the slow bits not the faster parts e.g. in NZ driving through small towns will often be the longest part of your trip time.