Displaying 20 results from an estimated 30 matches for "murmurhash3".
2018 Mar 26
2
murmurhash3 test failures on big-endian systems
Hi,
The dovecot 2.3.0.1 Debian package currently fails to build on all
big-endian architectures[1], due to murmurhash3 tests failing. The
relevant output from e.g. s390x is:
test-murmurhash3.c:22: Assert(#8) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
test-murmurhash3.c:22: Assert(#11) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
test-murmurhash3.c:22: Assert(#12) failed: m...
2018 Mar 26
0
murmurhash3 test failures on big-endian systems
On 26.03.2018 15:49, Apollon Oikonomopoulos wrote:
> Hi,
>
> The dovecot 2.3.0.1 Debian package currently fails to build on all
> big-endian architectures[1], due to murmurhash3 tests failing. The
> relevant output from e.g. s390x is:
>
> test-murmurhash3.c:22: Assert(#8) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
> test-murmurhash3.c:22: Assert(#11) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
> test-murmurhash3.c:2...
2018 Mar 26
2
murmurhash3 test failures on big-endian systems
Hi Aki,
On 15:55 Mon 26 Mar , Aki Tuomi wrote:
> On 26.03.2018 15:49, Apollon Oikonomopoulos wrote:
> > Hi,
> >
> > The dovecot 2.3.0.1 Debian package currently fails to build on all
> > big-endian architectures[1], due to murmurhash3 tests failing. The
> > relevant output from e.g. s390x is:
> >
> > test-murmurhash3.c:22: Assert(#8) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
> > test-murmurhash3.c:22: Assert(#11) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
> &...
2018 Mar 27
2
murmurhash3 test failures on big-endian systems
...nal diff that'll end up getting committed. It'd be good to know if
> it actually fixes the issue for you - sadly, I don't have a big endian
> system to play with.)
Thanks for the quick response!
Unfortunately still fails, although with fewer assertion errors than
before:
test-murmurhash3.c:34: Assert(#8) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
test-murmurhash3.c:34: Assert(#11) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
test-murmurhash3.c:34: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
murmurhash3 (murmurhash...
2018 Mar 27
0
murmurhash3 test failures on big-endian systems
.... It'd be good to know if
> > it actually fixes the issue for you - sadly, I don't have a big endian
> > system to play with.)
>
> Thanks for the quick response!
>
> Unfortunately still fails, although with fewer assertion errors than
> before:
>
> test-murmurhash3.c:34: Assert(#8) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
> test-murmurhash3.c:34: Assert(#11) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
> test-murmurhash3.c:34: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0
> murmurha...
2018 Mar 27
2
murmurhash3 test failures on big-endian systems
...e-inversion when loading the blocks
> which should be addressed in getblock{32,64}. Murmurhash treats each
> block as an integer expecting little-endian storage. Applying this
> additional change fixes the build on s390x (and does not break it on
> x864_64):
>
> --- b/src/lib/murmurhash3.c
> +++ b/src/lib/murmurhash3.c
> @@ -23,7 +23,7 @@
>
> static inline uint32_t getblock32(const uint32_t *p, int i)
> {
> - return p[i];
> + return cpu32_to_le(p[i]);
? or perhaps le32_to_cpu, although it should be the same in the end.
> }
>
> //------------...
2018 Mar 26
0
murmurhash3 test failures on big-endian systems
...sue for you - sadly, I don't have a big endian
system to play with.)
Thanks,
Jeff.
--
The obvious mathematical breakthrough would be development of an easy way to
factor large prime numbers.
- Bill Gates, The Road Ahead, pg. 265
-------------- next part --------------
diff --git a/src/lib/murmurhash3.c b/src/lib/murmurhash3.c
index 45dcc22..d0336a1 100644
--- a/src/lib/murmurhash3.c
+++ b/src/lib/murmurhash3.c
@@ -94,6 +94,8 @@ void murmurhash3_32 (const void *key, size_t len, uint32_t seed,
h1 = fmix32(h1);
+ h1 = cpu32_to_be(h1);
+
memcpy(out, &h1, sizeof(h1));
}
@@ -206,6 +...
2018 Mar 27
0
murmurhash3 test failures on big-endian systems
...locks
> > which should be addressed in getblock{32,64}. Murmurhash treats each
> > block as an integer expecting little-endian storage. Applying this
> > additional change fixes the build on s390x (and does not break it on
> > x864_64):
> >
> > --- b/src/lib/murmurhash3.c
> > +++ b/src/lib/murmurhash3.c
> > @@ -23,7 +23,7 @@
> >
> > static inline uint32_t getblock32(const uint32_t *p, int i)
> > {
> > - return p[i];
> > + return cpu32_to_le(p[i]);
>
> ? or perhaps le32_to_cpu, although it should be the same in...
2018 Mar 28
1
murmurhash3 test failures on big-endian systems
...ould be addressed in getblock{32,64}. Murmurhash treats each
> > > block as an integer expecting little-endian storage. Applying this
> > > additional change fixes the build on s390x (and does not break it on
> > > x864_64):
> > >
> > > --- b/src/lib/murmurhash3.c
> > > +++ b/src/lib/murmurhash3.c
> > > @@ -23,7 +23,7 @@
> > >
> > > static inline uint32_t getblock32(const uint32_t *p, int i)
> > > {
> > > - return p[i];
> > > + return cpu32_to_le(p[i]);
> >
> > ? or perhaps le...
2017 Jan 10
2
Default hashing function for integers (DenseMapInfo.h)
...r every version of clang/llvm compiled with the hash function, and here are the best timings:
- Original LLVM: hash(k) = (k >> 4) ^ (k >> 9)
3.40s
- Stupid hash: hash(k) = k
3.55s
- A bit less stupid: hash(k) = k >> unused_bits (defined by sizeof(T) = 2^unused_bits)
3.47s
- Murmurhash3
3.47s
So different hashing functions make a difference. For pointers, it seems that the one used by LLVM is quite good. It gives the best performance here. It is quite surprising that Murmurhash3 does not behave better than the “A bit less stupid” hash. My guess is that the LLVM hash function is...
2012 Feb 15
2
[LLVMdev] We need better hashing
On Tue, Feb 14, 2012 at 2:44 AM, Chris Lattner <clattner at apple.com> wrote:
> On Feb 13, 2012, at 2:00 AM, Talin wrote:
>>
>> Just out of curiosity, why not MurmurHash3 ? This page seems to
>> suggest that #2 has some flaw, and #3 is better all round:
>>
>> https://sites.google.com/site/murmurhash/
>>
> The main reason is because there's no incremental version of 3.
>
>
> I think that that is a great reason.
>
> LLVM...
2012 Feb 13
0
[LLVMdev] We need better hashing
On 13 February 2012 00:59, Talin <viridia at gmail.com> wrote:
> Here's my latest version of Hashing.h, which I propose to add to llvm/ADT.
> Comments welcome and encouraged.
> /// Adapted from MurmurHash2 by Austin Appleby
Just out of curiosity, why not MurmurHash3 ? This page seems to
suggest that #2 has some flaw, and #3 is better all round:
https://sites.google.com/site/murmurhash/
Would it be possible to use CityHash instead for strings?
http://code.google.com/p/cityhash/
Thanks,
Jay.
2012 Feb 13
5
[LLVMdev] We need better hashing
...ve a custom DenseMapInfo,
>> and that's where having a good hash function comes in.
>>
>> There are a bunch of hash functions out there (FNV1, SuperFastHash, and
>> many others). The best overall hash function that I am currently aware of
>> is Austin Appleby's MurmurHash3 (http://code.google.com/p/smhasher/).
>>
>> For LLVM's use, we want a hash function that can handle mixed data - that
>> is, pointers, ints, strings, and so on. Most of the high-performance hash
>> functions will work well on mixed data types, but you have to put
>>...
2012 Feb 13
5
[LLVMdev] We need better hashing
...ruary 2012 00:59, Talin <viridia at gmail.com> wrote:
> > Here's my latest version of Hashing.h, which I propose to add to
> llvm/ADT.
> > Comments welcome and encouraged.
>
> > /// Adapted from MurmurHash2 by Austin Appleby
>
> Just out of curiosity, why not MurmurHash3 ? This page seems to
> suggest that #2 has some flaw, and #3 is better all round:
>
> https://sites.google.com/site/murmurhash/
>
> The main reason is because there's no incremental version of 3. If you
look at the source, you'll notice that the very first thing that 3 does i...
2012 Feb 08
2
[LLVMdev] We need better hashing
...for complex key types, you really need to have a custom DenseMapInfo,
and that's where having a good hash function comes in.
There are a bunch of hash functions out there (FNV1, SuperFastHash, and
many others). The best overall hash function that I am currently aware of
is Austin Appleby's MurmurHash3 (http://code.google.com/p/smhasher/).
For LLVM's use, we want a hash function that can handle mixed data - that
is, pointers, ints, strings, and so on. Most of the high-performance hash
functions will work well on mixed data types, but you have to put
everything into a flat buffer - that is, a...
2012 Feb 14
0
[LLVMdev] We need better hashing
On Feb 13, 2012, at 2:00 AM, Talin wrote:
> Just out of curiosity, why not MurmurHash3 ? This page seems to
> suggest that #2 has some flaw, and #3 is better all round:
>
> https://sites.google.com/site/murmurhash/
>
> The main reason is because there's no incremental version of 3.
I think that that is a great reason.
> LLVM's needs, on the other hand, a...
2017 Jan 10
3
Default hashing function for integers (DenseMapInfo.h)
> On Jan 10, 2017, at 8:56 AM, Mehdi Amini <mehdi.amini at apple.com> wrote
>
> Some tests I can suggest is to replace the hash function with your favorite and:
Thanks. I’ll give it a try. It will take some time as I need to rewrite DenseMap if I want to use the Knuth multiplicative hash.
> ultimately I believe real-world impact is the best way to get a change in.
That’s
2012 Feb 09
0
[LLVMdev] We need better hashing
...ou really need to have a custom DenseMapInfo,
> and that's where having a good hash function comes in.
>
> There are a bunch of hash functions out there (FNV1, SuperFastHash, and
> many others). The best overall hash function that I am currently aware of
> is Austin Appleby's MurmurHash3 (http://code.google.com/p/smhasher/).
>
> For LLVM's use, we want a hash function that can handle mixed data - that
> is, pointers, ints, strings, and so on. Most of the high-performance hash
> functions will work well on mixed data types, but you have to put
> everything into a...
2012 Feb 17
0
[LLVMdev] We need better hashing
...Info,
>>> and that's where having a good hash function comes in.
>>>
>>> There are a bunch of hash functions out there (FNV1, SuperFastHash, and
>>> many others). The best overall hash function that I am currently aware of
>>> is Austin Appleby's MurmurHash3 (http://code.google.com/p/smhasher/).
>>>
>>> For LLVM's use, we want a hash function that can handle mixed data -
>>> that is, pointers, ints, strings, and so on. Most of the high-performance
>>> hash functions will work well on mixed data types, but you hav...
2012 Feb 15
3
[LLVMdev] We need better hashing
On Tue, Feb 14, 2012 at 2:44 AM, Chris Lattner <clattner at apple.com> wrote:
> On Feb 13, 2012, at 2:00 AM, Talin wrote:
>
> Just out of curiosity, why not MurmurHash3 ? This page seems to
>> suggest that #2 has some flaw, and #3 is better all round:
>>
>> https://sites.google.com/site/murmurhash/
>>
>> The main reason is because there's no incremental version of 3.
>
>
> I think that that is a great reason.
>
> LL...