I’m porting a complex algorithm from 32 Bit to 64 Bit that takes about 5 hours to compute on my Core i5 machine with 8GB RAM running Windows 7 64 Bit.
The application targets .NET 4 and makes use of the task parallel library for about 60% of the loops and uses the BigInteger class.
I’m dealing with two ranges of numbers:
- 0 to ulong.MaxValue (about 50% of the algo).
- Very large integers with hundreds of thousands of digits (about 50% of the algo).
The operations performed on these numbers include addition, subtraction multiplication, division, logarithm and power.
Once ported to 64 Bit, I will be able to profile and time the code to see performance increase but I wanted to know if I can estimate it through calculation.
If so, please recommend some articles that explain the same.
According to Amdahl’s law, you’ll see a maximum speed up by a factor of 1.33. There are applications (eg. bitboard chess engines) such that going from 32 bits to 64 bits will almost exactly double performance, but that is when almost all the data is 64 bit and is manipulated using bitwise operations. It’s hard to say without specific details, but in your case it will probably be less than the predicted factor.