B202,ubuntu 11.04(i386)での竹内関数の結果2011/08/23 21:28

ASUS B202 Intel Atom N270(1.6GHz)memoery 1GB

さすがに 非力

でも SBCLの速さは秀逸

ーーー以下のLOG
sbcl
This is SBCL 1.0.45.0.debian, 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 12 6 0))

Evaluation took:
0.549 seconds of real time
0.556035 seconds of total run time (0.556035 user, 0.000000 system)
101.28% CPU
883,049,988 processor cycles
0 bytes consed

12
* (time (tarai 13 7 0))

Evaluation took:
4.007 seconds of real time
4.000250 seconds of total run time (4.000250 user, 0.000000 system)
99.83% CPU
6,442,658,136 processor cycles
0 bytes consed

13
* (time (tarai 14 8 0))

Evaluation took:
31.056 seconds of real time
30.801925 seconds of total run time (30.797925 user, 0.004000 system)
99.18% CPU
49,937,932,260 processor cycles
0 bytes consed

14
* (quit)
butcher@ub8untu11:~$ clisp
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8

Welcome to GNU CLISP 2.48 (2009-07-28) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2009

Type :h and hit Enter for context help.

[1]> (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
[2]> (time (tarai 12 6 0))
Real time: 24.8886 sec.
Run time: 24.833551 sec.
Space: 0 Bytes
12
[3]> (time (tarai 13 7 0))
Real time: 214.1973 sec.
Run time: 211.3372 sec.
Space: 0 Bytes
13

コメント

コメントをどうぞ

※メールアドレスとURLの入力は必須ではありません。 入力されたメールアドレスは記事に反映されず、ブログの管理者のみが参照できます。

※なお、送られたコメントはブログの管理者が確認するまで公開されません。

※投稿には管理者が設定した質問に答える必要があります。

名前:
メールアドレス:
URL:
次の質問に答えてください:
下記の文字を入力して下さい(半角スペースあります)
Hoge desu

コメント:

トラックバック