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

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

bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze when edi


From: João Távora
Subject: bug#71367: 30.0.50; ELPA package breadcrumb causes Emacs freeze when editing json file
Date: Thu, 6 Jun 2024 14:00:20 +0100

On Thu, Jun 6, 2024 at 1:08 PM Eli Zaretskii <eliz@gnu.org> wrote:

> I don't see why using make-vector and vconcat, two existing
> primitives, would qualify as implementing something more general than
> what is needed here.

If someone uses those two primitives in the context of that
particular  algorithm, they'll likely to keep track of the capacity of
the vector saying how many things fit and the size counting how many
things are already there. You'll increment size when adding things
pushing and enlarge/reallocate when  size = capacity. By then you'll
have "open coded" VECTOR-PUSH-EXTEND or C++'s std::vector::push_back
or whatever your preferred language calls it.

João





reply via email to

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