[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pushing the `gnus-range-*' functions down into the C layer
From: |
Stefan Monnier |
Subject: |
Re: Pushing the `gnus-range-*' functions down into the C layer |
Date: |
Sun, 12 Sep 2010 11:57:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> #define EQ(x, y) (XHASH (x) == XHASH (y))
Not only that, but also
#define NILP(x) EQ (x, Qnil)
So EQ is really used extensively in C and slowing it down is likely to
make a perceptible difference.
>> /* Return a perfect hash of the Lisp_Object representation. */
>> #define XHASH(a) (a)
> this case I agree, it should not be called XHASH because that implies it
> is used for structural equivalence, which is misleading. Also, hashing
> object should behave like deep copying - follow pointers.
Nothing says that hashing an object should behave like deep copying.
That's why make-hash-table has a :test parameter which can be `eq' or
`equal'.
As for why we have XHASH: because there's another definition of it for
when we use a union rather than an int for Lisp_Object:
#define XHASH(a) ((a).i)
-- Stefan
- Re: Pushing the `gnus-range-*' functions down into the C layer, (continued)
- Re: Pushing the `gnus-range-*' functions down into the C layer, Lars Magne Ingebrigtsen, 2010/09/10
- bignums (was: Pushing the `gnus-range-*' functions down into the C layer), Ted Zlatanov, 2010/09/10
- Re: Pushing the `gnus-range-*' functions down into the C layer, Andreas Schwab, 2010/09/10
- Re: Pushing the `gnus-range-*' functions down into the C layer, David Kastrup, 2010/09/10
- Re: Pushing the `gnus-range-*' functions down into the C layer, Lars Magne Ingebrigtsen, 2010/09/10
- Re: Pushing the `gnus-range-*' functions down into the C layer, Stefan Monnier, 2010/09/11
- Re: Pushing the `gnus-range-*' functions down into the C layer, Lars Magne Ingebrigtsen, 2010/09/11
- Re: Pushing the `gnus-range-*' functions down into the C layer, Stephen J. Turnbull, 2010/09/11
- Re: Pushing the `gnus-range-*' functions down into the C layer, Lars Magne Ingebrigtsen, 2010/09/11
- Re: Pushing the `gnus-range-*' functions down into the C layer, Wojciech Meyer, 2010/09/11
- Re: Pushing the `gnus-range-*' functions down into the C layer,
Stefan Monnier <=
- Re: Pushing the `gnus-range-*' functions down into the C layer, Tom Tromey, 2010/09/10
- Re: Pushing the `gnus-range-*' functions down into the C layer, Ted Zlatanov, 2010/09/14
- Re: Pushing the `gnus-range-*' functions down into the C layer, Stephen J. Turnbull, 2010/09/11
- Re: Pushing the `gnus-range-*' functions down into the C layer, Eli Zaretskii, 2010/09/13
Re: Pushing the `gnus-range-*' functions down into the C layer, Wojciech Meyer, 2010/09/09
Re: Pushing the `gnus-range-*' functions down into the C layer, Andy Wingo, 2010/09/10