[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's the specification for sxhash?
From: |
Philippe Schnoebelen |
Subject: |
Re: What's the specification for sxhash? |
Date: |
Fri, 7 Jun 2019 08:43:49 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 2019/06/06 14:52, Stefan Monnier wrote:
>> Probably the doc string should be more explicit about what is/is not
>> guaranteed. Is consistency only guaranteed inside the current running
>> emacs thread/process?
> Yes, they're only guaranteed to work within a particular Emacs session.
>
> In practice they're fairly stable across sessions, but they depend for
> example on the size of fixnums, so they're different in a 32bit build of
> Emacs and a 64bit build of Emacs. And we don't guarantee that they
> don't change from one version to another.
Thanks to Andreas and Stefan for the explanations. I was rather confused
in my use of sxhash as a kind of signature for objects. I now see that
the confusion lasted because I only used it on number trees (conses and
integers).
Any comments about the collision avoidance? Many simple objects have a 0
sxhash-equal value.
--phs