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

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

Re: [External] : Use of an associated list with completing-read


From: Stefan Monnier
Subject: Re: [External] : Use of an associated list with completing-read
Date: Fri, 19 Apr 2024 19:32:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> Originally I had the associated list made by

"alist" is an abbreviation for "association list" rather than "associated
list".

>     ;; First  Version
>     (setq-local tema-lugar
>                 (append tema--lugar (list (cons lnum strg))))

This is the classic recipe for poor scaling performance since the above
operation takes time proportional to the length of the list, so if you
execute this N times (in a loop), the loop builds a list of length N but
takes time N² to do it.  When N is small, noone notices, and as it gets
large the performance starts to suck.


        Stefan




reply via email to

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