On some input, scala's BigInt.pow(Int):BigInt is slower than an
equivalent hand-written function. For example, look here:
http://ideone.com/HEpiz
In that example, the "pow" function runs for 1.252sec, and its
alternative for 1.188sec. (I have also tested it in a loop, timings
are stable, but ideone doesn't allow program to run more than 5 sec,
so there is short version)
However, at some other inputs the opposite things happen. So the
question is - how the "pow" function works, in a nutshell?