emacs-devel
[Top][All Lists]
Advanced

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

Re: Time to merge scratch/correct-warning-pos into master, perhaps?


From: Eli Zaretskii
Subject: Re: Time to merge scratch/correct-warning-pos into master, perhaps?
Date: Fri, 04 Feb 2022 14:06:39 +0200

> Date: Fri, 4 Feb 2022 11:57:21 +0000
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, mattiase@acm.org,
>   Eli Zaretskii <eliz@gnu.org>, larsi@gnus.org, emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> Compilation _does_ do things differently.  It runs with
> symbols-with-pos-enabled bound to t, which makes EQ slower than when
> that variable is nil.  To see this, have a look at the defition of
> lisp_h_EQ in src/lisp.h, around line 372.

Can you explain why we need to complicate EQ so much to account for
symbols-with-pos?  Specific questions:

  . comparison of a symbol and symbol-with-pos should only compare the
    symbol part, and disregard the "pos" part, right?
  . if so, couldn't we implement symbol-with-pos as a struct that has
    the symbol at its beginning, and then use memcmp to compare only
    that part?

Or what am I missing?



reply via email to

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