処理時間の計測 - lisp-cookbook-ja/common-lisp GitHub Wiki

  • 実行時間の測定 time 関数によって、フォームの評価が完了するまでのに要した時間を計測することができます
(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))))

# (time (tarai 12 6 0))

Evaluation took:
  0.087 seconds of real time
  0.078125 seconds of total run time (0.078125 user, 0.000000 system)
  89.66% CPU
  312,811,374 processor cycles
  0 bytes consed

12

参考リンク