[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil |
Date: |
Mon, 19 Jan 2015 23:37:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> If we can't rely on Qnil being 0, what's the point of making Qnil == 0
> in the first place?
Allow the compiler to make some optimizations.
> If we can rely on Qnil being 0, we can put Lisp variables in BSS, use
> memset, and perform other nice optimizations.
Right. But Lisp_Object representation has changed several times over
the years (tags in MSB, then tags in LSB, unions, structs, ...) and
I wouldn't be surprised if tens years from now it'll be obvious that "we
should drop the Qnil==0 thingy so we can perform <foo> optimization".
It's OK to make a few targeted optimizations based on Qnil==0, but it
should stay sufficiently confined that it we can sufficiently easily
enumerate the places where we make such assumptions and change them.
Stefan
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Stefan Monnier, 2015/01/19
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Daniel Colascione, 2015/01/19
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil,
Stefan Monnier <=
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Daniel Colascione, 2015/01/20
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Stefan Monnier, 2015/01/20
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Paul Eggert, 2015/01/20
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Stefan Monnier, 2015/01/21
- Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Paul Eggert, 2015/01/21
Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Paul Eggert, 2015/01/19