1(setq big1 (sub1 (expt 123456 30)))
2(setq big2 (sub1 (expt 654321 24)))
3(setq big3 (times big1 big2))
4
5(load inum compiler)
6(on comp)
7(on time)
8
9(de timing(u)
10   (prog (t1 t2 d m)
11    (setq m 20)
12    (setq d 0)
13    (ifor (from i 1 m 1)
14     (do(progn
15      (reclaim)
16      (setq t1(time))
17      (apply u nil)
18      (setq t2 (time))
19      (setq d (plus d (difference t2 t1)))
20    )))
21    (return (quotient d m))
22))
23
24
25(de testadd()
26   (ifor (from i 1 5000 1)
27         (do (plus big1 big2 big1 big2 big1 big2 big1 big2))))
28
29(timing 'testadd)
30
31   % 32:   1336 1340  1396
32   % 30:   1735 1778  1767
33   %   22 %
34
35(de testmult()
36   (ifor (from i 1 250 1)
37         (do (times big1 big2 big1 big2 big1 big2 big1 big2))))
38
39(timing 'testmult)
40
41  % 32:    2868  2838  2870
42  % 30:    3396  3490  3440
43  %    26%
44
45
46(de testquot()
47   (ifor (from i 1 5000 1)
48         (do (quotient big3 big2))))
49
50(timing 'testquot)
51
52  % 32:    4461  4489  4572
53  % 30:   17895 17544 18195
54  %    70 %
55