[email protected]
[Top] [All Lists]

[Haskell-cafe] Re: 64-bit Bloom filters?

Subject: [Haskell-cafe] Re: 64-bit Bloom filters?
From: Maciej Piechotka
Date: Tue, 05 Jan 2010 20:16:27 +0100
On Tue, 2010-01-05 at 10:02 -0800, Bryan O'Sullivan wrote:
> 
>         Although I'm not clear on why it would cause crashes (SEGV,
>         infinite
>         looping, etc), my prime suspect is the hashing function used.
>          This is
>         from C and returns a uint32, but it is imported to return a
>         CInt, which
>         I suspect is 64 bits.
> 
> A CInt is 32 bits on the only 64-bit architecture that anyone really
> uses (x86_64) :-) 

It does not depend on architecture but on compiler/C library:
http://en.wikipedia.org/wiki/64-bit#Specific_data_models

In most popular models (LLP64/LP64) it is 32-bits. However even SILP64
with 64-byte short is correct. Compiler having 16-bit integer on x86_64
is technically correct AFAIK (althought not on POSIX).

Regards

PS. Of course it is not the problem but it should not be done. There is
nowhere written int's are 32-bits - in fact one of the reason they were
left 32-bits (except having something between short and long) was
incorrect assumption that they are.



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>