I am looking for a very fast function to calculate the sum of digits of a long variable.
Using now a simple loop:
But it is definately too slow. Any other ideas are welcome :)
Using now a simple loop:
Function QSum2:int(Lo:Long) Local QS:int For Local i:Int = 0 To String(Lo).length - 1 Qs:+Int(String(Lo)[i..i+1]) Next Return Qs End Function
But it is definately too slow. Any other ideas are welcome :)