UNPKG

306 BPlain TextView Raw
1const BigInteger = java.math.BigInteger
2
3{
4 let start = Date.now()
5
6 let a = BigInteger.valueOf(1)
7 let b = BigInteger.valueOf(2)
8 for (let i = 0; i < 100000; i++) {
9 let c = a.add(b)
10 a = b
11 b = c
12 }
13
14 echo(b.toString().length)
15 echo(Date.now() - start + "ms")
16}