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

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

bug#37321: 27.0.50; Excessive gc in a use case (el-search)


From: Michael Heerdegen
Subject: bug#37321: 27.0.50; Excessive gc in a use case (el-search)
Date: Sat, 21 Sep 2019 02:44:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Noam Postavsky <npostavs@gmail.com> writes:

> I would expect it to produce more garbage.  A list of length N has to
> contain 2N slots (2 for each cons = car+cdr).  A hash table with N
> items, needs at least 2N as well: N keys + N values.  And since it
> stores these in vectors/arrays, as you add items it has to reallocate
> them to resize (and the final size will likely be a bit higher than N),
> producing more garbage (this can be avoided if you can pass :size N up
> front).

Makes sense, thanks.  So in the case I had in mind switching to hash
tables offers no advantages.

Michael.





reply via email to

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