help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OFF TOPIC] Algorithms (was: Re: Too fine design granularity leads t


From: Yuri Khan
Subject: Re: [OFF TOPIC] Algorithms (was: Re: Too fine design granularity leads to numerous macro/function/command existed in Emacs.)
Date: Fri, 13 Aug 2021 20:17:52 +0700

On Fri, 13 Aug 2021 at 20:08, Emanuel Berg via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> 2QdxY4RzWzUUiLuE wrote:

> > Don't sort unless you have to.

> *thumbs down*

The advice is sound. Asymptotically, sorting in order to extract one
longest (maximum, best) element is like firing a cannon at sparrows:
sorting requires O(N*log(N)) comparisons but a single maximum value
can be found in just O(N).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]