[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning
Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil
Mon, 19 Jan 2015 21:52:25 -0800
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
On 01/19/2015 08:37 PM, Stefan Monnier wrote:
> 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.
The problem with this approach is that we'll have sections of code that
exist only to account for an uncommon configuration. They'll bitrot, and
the code will grow implicit dependencies on Qnil being zero anyway.
It'll be just like GCPRO. I'd rather just declare that Qnil will always
be zero and take full advantage of the change.
Description: OpenPGP digital signature
Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil, Paul Eggert, 2015/01/19