Miller test for big numbers

The whole problem is told in previous link to here. As is said, bignumber unit should be applied to Miller's test to make it efficient for primes, which really interest us. Therefore I translated previous program using bignumber.pas. Unfortunately it's not yet really efficient, because for 10- digits numbers it takes him almost two seconds to process the input. If anybody has any idea, how to improve this algorithm, please send me.

See source code.

To see that it really works, use below: