B4J Question Bit object and Bitcount

giggetto71

Active Member
Licensed User
Longtime User
Hi all,
I am looking for a native method to count the 1 inside a long variable. I say native because I would need it super fast as i need to use it for chess engine bitboards.
Perfect if @Erel finds 5 mins :-) to add to the Bit object..any chance?
Thanks!!!
 
Code: Copy
    Dim a As Long = 1234567
    Dim jo As JavaObject
    jo.InitializeStatic("java.lang.Long")
    Log(jo.RunMethod("bitCount",Array(a)))
 
Upvote 0
Back
Top