From: james a. <jam...@se...> - 2004-01-11 11:17:32
|
On Sunday, Jan 11, 2004, at 03:09 Europe/Berlin, Sam Steingold wrote: ... >> [tschichold:clisp/clisp-2003-12-26/build-20031226] >> janson% ./clisp >> benchmark combinations. >> === running #<benchmark CLOS/defclass for 1 runs> >> ;; CLOS/defclass 1.74 1.50 0.00 7 >> === running #<benchmark CLOS/defmethod for 1 runs> >> ;; CLOS/defmethod 0.74 0.70 0.00 4 >> === running #<benchmark CLOS/instantiate for 2 runs> >> ;; CLOS/instantiate 13.49 13.30 0.00 220 >> === running #<benchmark CLOS/simple-instantiate for 200 runs> >> ;; CLOS/simple-instantiate 9.75 9.67 0.00 111 >> === running #<benchmark CLOS/methodcalls for 5 runs> >> ;; CLOS/methodcalls 22.68 20.95 0.00 340 >> === running #<benchmark CLOS/method+after for 2 runs> >> ;; CLOS/method+after 13.29 11.53 0.00 130 >> === running #<benchmark CLOS/complex-methods for 5 runs> >> ;; CLOS/complex-methods 7.04 6.50 0.00 0 >> >> compile/load extensions w/ new standard expansion. >> benchmark w/ new standard expansion. >> === running #<benchmark CLOS/defclass for 1 runs> >> ;; CLOS/defclass 1.33 1.33 0.00 5 >> === running #<benchmark CLOS/defmethod for 1 runs> >> ;; CLOS/defmethod 0.72 0.69 0.00 4 >> === running #<benchmark CLOS/instantiate for 2 runs> >> ;; CLOS/instantiate 15.09 14.81 0.00 215 >> === running #<benchmark CLOS/simple-instantiate for 200 runs> >> ;; CLOS/simple-instantiate 9.90 9.77 0.00 107 >> === running #<benchmark CLOS/methodcalls for 5 runs> >> ;; CLOS/methodcalls 7.65 7.49 0.00 0 >> === running #<benchmark CLOS/method+after for 2 runs> >> ;; CLOS/method+after 4.05 4.12 0.00 5 >> === running #<benchmark CLOS/complex-methods for 5 runs> >> ;; CLOS/complex-methods 7.55 7.56 0.00 0 > > I am not sure I quite understand this... the values are the results from function below (from cl-bench:sysdep;setup-clisp.lisp). i'm still trying to figure out what each really tests, but in rough terms - "instantiate" appears to instantiate within an extended class hierarchy for which there are :after methods for initialize-instance, while "instantiate/simple" does the same for a two-class hierarchy without initialize-instance specialization. - "methodcalls" applies a function with a standard combination on all instances of the class graph where the methods call-next-method, "method+after" does the same after adding after methods to the function, and "complex-methods" applies a function with an AND combination. (defun bench-time (fun times name) (declare (ignore name)) (labels ((merge-2-values (val1 val2) (if (< internal-time-units-per-second 1000000) (dpb val1 (byte 16 16) val2) ; TIME_1: AMIGA, DOS, OS/2, UNIX_TIMES (+ (* val1 internal-time-units-per-second) val2))) ; TIME_2: UNIX sonst, WIN32 (secs (v1 v2 v3 v4) (/ (- (merge-2-values v1 v2) (merge-2-values v3 v4)) internal-time-units-per-second))) (multiple-value-bind (new-real1 new-real2 new-run1 new-run2 new-gc1 new-gc2 new-space1 new-space2 new-gccount) (sys::%%time) (dotimes (i times) (funcall fun)) (multiple-value-bind (old-real1 old-real2 old-run1 old-run2 old-gc1 old-gc2 old-space1 old-space2 old-gccount) (sys::%%time) ;; returns real user sys consed (values (secs old-real1 old-real2 new-real1 new-real2) (secs old-run1 old-run2 new-run1 new-run2) 0.0 (- old-gccount new-gccount)))))) |