[Ecls-list] Objective achieved

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Mon Feb 11 07:34:36 UTC 2008


It seems the spurious consing has been eliminated. Compiling and
loading the file below now gives

real time : 0.033 secs
run time  : 0.032 secs
gc count  : 1 times
consed    : 0 bytes

which compared to the original may not seem much, but it is a starting point

real time : 0.048 secs
run time  : 0.048 secs
gc count  : 2 times
consed    : 1600096 bytes

The difference is more evident in the pretty-printing test code I
mentioned in other messages. Without the new stack frames one gets

real time : 1.910 secs
run time  : 1.878 secs
gc count  : 18 times
consed    : 34629104 bytes

and with them on:

real time : 1.657 secs
run time  : 1.624 secs
gc count  : 4 times
consed    : 6736512 bytes

Though the difference in speed is not that large, the difference in
memory use  is a factor 5.

The code for implementing and using stack frames is still in a CVS
branch, in case someone wants to test it.

(defmethod foo ((a t))
  a)
;; This is to force the method combination in the cache
(dotimes (i 100000) (foo 1))
;; This part should not cons any more
(time (dotimes (i 100000) (foo 1)))


-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list