* Re: [Emacs-diffs] master 3b48f99: Tune pseudovector allocation assuming Qnil == 0
[not found] ` <E1YC2yH-0004qI-S2@vcs.savannah.gnu.org>
@ 2015-01-16 16:31 ` Stefan Monnier
2015-01-19 9:03 ` Paul Eggert
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2015-01-16 16:31 UTC (permalink / raw)
To: emacs-devel; +Cc: Dmitry Antipov
> + /* Only the first lisplen slots will be traced normally by the GC.
> + But since Qnil == 0, we can memset Lisp_Object slots as well. */
> + memset (v->contents, 0, zerolen * word_size);
Is Qnil==0 true for all builds? Maybe it's better to do
if (Qnil == 0)
<newcode>
else
<oldcode>
-- Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] master 3b48f99: Tune pseudovector allocation assuming Qnil == 0
2015-01-16 16:31 ` [Emacs-diffs] master 3b48f99: Tune pseudovector allocation assuming Qnil == 0 Stefan Monnier
@ 2015-01-19 9:03 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2015-01-19 9:03 UTC (permalink / raw)
To: Stefan Monnier, emacs-devel; +Cc: Dmitry Antipov
Stefan Monnier wrote:
> Is Qnil==0 true for all builds?
Yes, that's been true since Jan 10. I looked, and there are some other places
where we can profitably prefer memset to assigning Qnil by hand; I did this in
commit b7f83adda5a32140811e8e7decc4394d64cada3d just now.
> Maybe it's better to do
>
> if (Qnil == 0)
> <newcode>
> else
> <oldcode>
It's a bit simpler to verify that Qnil is zero, as in the abovementioned commit.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-19 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150116091337.18580.48119@vcs.savannah.gnu.org>
[not found] ` <E1YC2yH-0004qI-S2@vcs.savannah.gnu.org>
2015-01-16 16:31 ` [Emacs-diffs] master 3b48f99: Tune pseudovector allocation assuming Qnil == 0 Stefan Monnier
2015-01-19 9:03 ` Paul Eggert
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.