Am 07.06.2011 19:37, schrieb Andrew Coppin:
On 06/06/2011 09:34 PM, Nicu Ionita wrote:

Hi,

Just to double check: that means, today it's not possible to generate 64
bit operations under Windows, including bit level .&., .|. a.s.o. (from
Data.Bits), and this situation will stay like this for a while.

I'm asking this because I'm currently writing a pure Haskell chess
engine based on bitboards. The bitboards are 64 bit wide and the basic
operations are critical for speed, which is always critical in chess
engines.

Then it looks I'll have to implement these operations in C and use FFI
to link them.

No, 64-bit integer operations will /work/ just fine, regardless of what platform you're on. Whether it will take advantage of 64-bit operations at the machine-code level is another matter entirely.

I'm not especially sure, but I think even in 32-bit mode, the x86 line of processors supports performing 64-bit operations via MMX, SSE or similar. Whether GHC is using that, I couldn't tell you.

I suppose the ultimate answer is: Benchmark it, and see how fast it is.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Yes, I was a little bit unclear, I wanted to say: the generated code does not use the 64 bit instructions (i.e. 1 instruction for .&., for example). Of course, it works, but I suppose, much slower then it could (3-4 times, for that part?)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to