[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how do you time the execution of a form?
From: |
Andy Wingo |
Subject: |
Re: how do you time the execution of a form? |
Date: |
Wed, 05 Dec 2007 23:45:55 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
Hi,
On Fri 30 Nov 2007 09:57, address@hidden (Ludovic Courtès) writes:
> "Marco Maggi" <address@hidden> writes:
>
>> is there a procedure that prints the execution time of a form?
>> Something like:
>>
>> (time-this (the-form) 1000)
>> ;; run (the-form) 1000 times and prints the result
>
> In Guile-Library, there's `(debugging time)', which exports `time', a
> macro that does exactly what you want.
Docs for that form: http://home.gna.org/guile-lib/doc/ref/debugging.time/
Also, as it turns out (of course I only knew this after I added time to
guile-lib), there is (ice-9 time):
;;; Commentary:
;; This module exports a single macro: `time'.
;; Usage: (time exp)
;;
;; Example:
;; guile> (time (sleep 3))
;; clock utime stime cutime cstime gctime
;; 3.01 0.00 0.00 0.00 0.00 0.00
;; 0
Regards,
Andy
--
http://wingolog.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: how do you time the execution of a form?,
Andy Wingo <=