[Ecls-list] Consing statistics?

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sat Dec 23 16:26:24 UTC 2006


2006/12/21, Dave Roberts <dave at vyatta.com>:
> I took a look at the Boehm collector and found a few stats that seemed
> interesting. The attached patch modifies TIME so that it prints out the
> number of bytes consed in the timed form, as well as the number of GCs.

Hi Dave, I had a look at the library. I have committed a patch that
only works when ECL is built against its own version of the garbage
collector, but it has the advantage that it is accurate: when the
counter in the GC wraps around, the library notices it. Besides that,
statistics are only computed when in TIME, what makes it a very
innocent change.

Juanjo

jjgarcia at pcgordo:~/src/ecl$ ecl
ECL (Embeddable Common-Lisp) 0.9i
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Broken at EVAL.
> (time (dotimes (i 10000) (cos 1.0)))
real time : 0.000 secs
run time  : 0.017 secs
consed    : 150892 bytes
NIL
> (time (dotimes (i 10000) (cos 1.0)))
real time : 0.000 secs
run time  : 0.017 secs
consed    : 46594 bytes
NIL
> (time (dotimes (i 10000) (cos 1.0)))
real time : 0.000 secs
run time  : 0.000 secs
consed    : 46594 bytes
NIL

-- 
Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 2804 (Spain)
http://teorica.fis.ucm.es/~jjgarcia/




More information about the ecl-devel mailing list