BuZz
BuZz

Reputation: 17475

Java applets and 64 bit integers

I am starting a chess program. Within that frame, I am hesitating between two popular representations of the board, known respectively as 0x88 and bitboards. Bitboards is the most recent development and is being used by one of the top open source algorithms -> Crafty.

Bitboards rely on the fact that 64 bit integers can take advantage of 64 bit registers at low level for bitwise operations. (we know we can have 64 bit integers as well on a 32bit machine, but operations such as shifting might become counterproductive)

Given that Java Applets are an "old" technology, will my chess applet be able to benefit from 64 bit architectures when available on the client side ? Are is there anything limiting java applets to 32bit representations of integers ?

I found hardly nothing concrete by googling apart from JVM considerations that don't really answer the question.

Upvotes: 0

Views: 110

Answers (2)

Ted Hopp
Ted Hopp

Reputation: 234807

On a client machine, Java applets usually execute in the same JVM as regular Java applications. If the JVM supports 64-bit hardware (and most recent JVMs do), then the applet will take advantage of it as well. The fact that applets are an "old" technology is irrelevant—it's all built on top of the JVM, and that's what determines the interaction with the hardware.

Upvotes: 5

ControlAltDel
ControlAltDel

Reputation: 35011

java integers are 32 bit by definition. If you want 64 bits, you can use a long

Upvotes: 1

Related Questions