[Top][All Lists]

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

Re: [GNU ELPA] New package: tam

From: Stefan Monnier
Subject: Re: [GNU ELPA] New package: tam
Date: Thu, 21 Sep 2023 09:59:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> You're correct, the accessors and setfs _are_ inlined as arefs and
> asets.

Thanks for confirming.

> accessor.  There are a lot of type-of, all of which are excessive for
> this type of low-level function.

You might be able to remove those by playing with the optimization
level, e.g.:

    (cl-declaim (optimize (speed 3)))

> or tam--pool.  In any case, every call operation invokes maybe_gc
> unconditionally, so there is a chance of a GC occuring during the
> execution of the byte-vector.

The GC can occur right before or right after since the act of calling
your functions will go through `maybe_gc`, in any case, so I doubt
that will ever make a significant difference.

>> > Aside from the unknown complexity of invoking those functions, every
>> > call has a risk of overflowing the current stack and requiring an
>> > additional stack segment be allocated.
>> That would still be O(1) in my book.
> Is that actually guaranteed?


> I haven't looked to see if obtaining an additional stack segment might
> cause a gc or just a system call to get more memory.

AFAIK, Emacs is not run as a real-time task, so I wonder why you're
worrying about that.
[ And no, an additional stack segment should not trigger GC, AFAIK.  ]


reply via email to

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