emacs-devel
[Top][All Lists]
Advanced

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

Re: I created a faster JSON parser


From: Gerd Möllmann
Subject: Re: I created a faster JSON parser
Date: Fri, 15 Mar 2024 15:56:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

"Herman, Géza" <geza.herman@gmail.com> writes:

>> What do I propose: If you can, please make objects reachable from the
>> control stack. For instance, create a context object on the stack
>> that has a Lisp vector member. That will prevent GC'ing the vector
>> and by that its contents, of course. You could pass a pointer to the
>> context around to get access to the vector in subroutines, replace it
>> with a larger vector if necessary, and so on.
>
> I implemented this idea, here is the latest version (now,
> object_workspace is a Lisp_Object):
>
> https://github.com/geza-herman/emacs/commit/12decaddc9b8260745be4d5782fea21f4578eab2.patch
>
> Is there anything that need to be done?

Thanks, that looks very good, I'm happy :-).

By putting a struct json_parser on the stack as a local variable, its
.object_workspace itself and everything rechable from it are safe from
GC.



reply via email to

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