emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add a mechanism for passing unibyte strings from lisp to mod


From: Eli Zaretskii
Subject: Re: [PATCH] Add a mechanism for passing unibyte strings from lisp to modules.
Date: Wed, 26 Jun 2024 18:34:28 +0300

> Date: Wed, 26 Jun 2024 15:33:09 +0200
> From: tomas@tuxteam.de
> Cc: brennan@umanwizard.com, acorallo@gnu.org, stefankangas@gmail.com,
>       emacs-devel@gnu.org
> 
> > > > How will it be different from the Lisp vectors we already have?
> > > 
> > > The box around every byte.
> > 
> > What box?  Please tell more, as I don't think I follow.
> 
> Maybe I'm all wrong, but AFAIU, a vector can contain arbitrary Lisp
> values. That makes 64bits/8bits plus boxing/unboxing (which is, I
> assume, quick, but nonzero).
> 
> Having a specialized "array of bytes" (as there is one for bools)
> might be beneficial for big arrays, and perhaps avoid big data moving
> operations over the C/LISP fence.

If you are saying that using 64-bit values there incurs a run-time
performance penalty, then accessing bytes does that as well.  Someone
should profile this and present evidence wrt the relative performance
of these, then we can discuss whether the penalty is real and whether
it is worth adding yet another data type to Emacs.



reply via email to

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