MacBooKProのVM環境での竹内関数テスト ― 2011/08/25 02:54
MacBooKPro(2011) I7 2.2GHz
ゲストOSは FreeBSD8.2 で2CPUメモリ 2GBに設定
SBCLを動かすと B202よりも全然速い
4倍近く速い
sbcl
This is SBCL 1.0.49, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (defun tarai (x y z)
(if (<= x y)
y
(tarai (tarai (1- x) y z) (tarai (1- y) z x) (tarai (1- z) x y))))
TARAI
* (time (tarai 13 7 0))
Evaluation took:
1.143 seconds of real time
1.143055 seconds of total run time (1.142697 user, 0.000358 system)
100.00% CPU
2,508,722,798 processor cycles
0 bytes consed
13
* (time (tarai 14 8 0))
Evaluation took:
8.651 seconds of real time
8.648570 seconds of total run time (8.648526 user, 0.000044 system)
99.98% CPU
18,983,103,870 processor cycles
0 bytes consed
14
ゲストOSは FreeBSD8.2 で2CPUメモリ 2GBに設定
SBCLを動かすと B202よりも全然速い
4倍近く速い
sbcl
This is SBCL 1.0.49, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (defun tarai (x y z)
(if (<= x y)
y
(tarai (tarai (1- x) y z) (tarai (1- y) z x) (tarai (1- z) x y))))
TARAI
* (time (tarai 13 7 0))
Evaluation took:
1.143 seconds of real time
1.143055 seconds of total run time (1.142697 user, 0.000358 system)
100.00% CPU
2,508,722,798 processor cycles
0 bytes consed
13
* (time (tarai 14 8 0))
Evaluation took:
8.651 seconds of real time
8.648570 seconds of total run time (8.648526 user, 0.000044 system)
99.98% CPU
18,983,103,870 processor cycles
0 bytes consed
14
コメントをどうぞ
※メールアドレスとURLの入力は必須ではありません。 入力されたメールアドレスは記事に反映されず、ブログの管理者のみが参照できます。
※なお、送られたコメントはブログの管理者が確認するまで公開されません。
※投稿には管理者が設定した質問に答える必要があります。