[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: |
Wojciech Meyer |
Subject: |
Re: Pushing the `gnus-range-*' functions down into the C layer |
Date: |
Sat, 11 Sep 2010 17:15:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 |
Lars Magne Ingebrigtsen <address@hidden> writes:
> "Stephen J. Turnbull" <address@hidden> writes:
>
>> No, for all types. First you have to check whether something is a
>> bignum, then if not you do a bit-pattern comparison. Worst case this
>> could double the cost of doing EQ(x,y) in C, and in Lisp `eq' will
>> cost a perceptible amount more.
>
> Right. Is EQ in C just implemented as a memory check, and absolutely
> nothing else? It doesn't touch the data at all in any way?
>
> *etag around a bit*
>
> #define EQ(x, y) (XHASH (x) == XHASH (y))
>
> which is
>
> /* Return a perfect hash of the Lisp_Object representation. */
> #define XHASH(a) (a)
>
> So, yeah, stupid idea. Never mind.
Yes, because it is physical equivalence, and pointers are unique. In
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.
Wojciech
- Re: Pushing the `gnus-range-*' functions down into the C layer, (continued)
- Re: 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, 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 <=
- Re: Pushing the `gnus-range-*' functions down into the C layer, Stefan Monnier, 2010/09/12
- 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