Gauche と Mosh の比較(fib)
まず一命令計測
CONSTI(3) と CONSTANT 3 の比較。
どちらも 1命令あたり 19 usec.(ディスパッチ含まず)
fib 比較
まずは Gauche 250msec 総ディスパッチ回数:28426604
1 | LREF0-PUSH | count=2695606 time=150763 17.879758 |
2 | CONSTI(2) | count=4038857 time=214925 18.791937 |
3 | BNLE 6 | count=2692537 time=161187 16.704430 |
4 | CONSTI(1) | |
5 | RET | count=2693741 time=151458 17.785399 |
6 | PRE-CALL(1) | count=2695874 time=150357 17.929820 |
7 | LREF0 | count=2727325 time=148522 18.363104 |
8 | NUMADDI(-1) | count=2694602 time=148077 18.197303 |
9 | PUSH-GREF-CALL(1) | CALL:count=2697116 time=190623 14.148954, GREF:count=2695037 time=151184 17.826205 |
10 | PUSH-PRE-CALL(1) | PRE-CALL:count=2695874 time=156625 17.212284 |
11 | LREF0 | |
12 | NUMADDI(-2) | |
13 | PUSH-GREF-CALL(1) # |
|
14 | NUMADD2 | count=1346351 time=78364 17.180734 |
15 | RET |
次に Mosh 330msec 総ディスパッチ回数:25602837回
1 | REFER_LOCAL0_PUSH_CONSTANT 2 | count=6731760 time=359173 18.742389 |
2 | NUMBER_LE_TEST 5 | count=4039107 time=250283 16.138160 |
3 | CONSTANT 1 | count=1346570 time=77172 17.448945 |
4 | LOCAL_JMP | count=1346805 time=71224 18.909427 |
5 | FRAME 7 | count=2692907 time=592914 4.541817 |
6 | REFER_LOCAL0_PUSH_CONSTANT 1 | |
7 | NUMBER_SUB_PUSH | count=2692538 time=154459 17.432056 |
8 | REFER_GLOBAL | count=2692846 time=165675 16.253786 |
9 | CALL fib | count=2693070 time=181649 14.825680 |
10 | PUSH_FRAME 7 | |
11 | REFER_LOCAL0_PUSH_CONSTANT 2 | |
12 | NUMBER_SUB_PUSH | |
13 | REFER_GLOBAL_CALL fib 1 | |
14 | NUMBER_ADD | count=1346288 time=81881 16.442007 |
15 | RETURN1 | count=2692907 time=147138 18.301914 |