[lisplab-cvs] r165 - trunk/src/test

Jørn Inge Vestgården jivestgarden at common-lisp.net
Thu May 13 18:44:18 UTC 2010


Author: jivestgarden
Date: Thu May 13 14:44:18 2010
New Revision: 165

Log:
added new tests

Modified:
   trunk/src/test/scaling-test.lisp

Modified: trunk/src/test/scaling-test.lisp
==============================================================================
--- trunk/src/test/scaling-test.lisp	(original)
+++ trunk/src/test/scaling-test.lisp	Thu May 13 14:44:18 2010
@@ -18,7 +18,7 @@
   (mapcar (lambda (x) 
 	    (/ (loop for i from 0 below N 
 		    sum (seconds-of-internal-real-time 
-			 (lambda () (funcall fun x))))
+			 (lambda () (apply fun x))))
 	       N))
 	  inputs))
 
@@ -55,17 +55,35 @@
     .sin .cos .tan 
     .asin .acos .atan   
     .sinh .cosh .tanh 
-    .asinh 
-    ;; .acosh 
-    .atanh   
+    .asinh .acosh .atanh
     .abs .re .im .conj))
 
+(defun matrix-functions ()
+  '(mmax mmin mabsmax mabsmin ll::mminmax))
+
 (defun report-function-times (filename &key 
 			      (ns '(1 2 3 4 5 10 20 50 100 150 200 300 400 500))
 			      (avg 10)
 			      (funs (ordinary-functions))			     
 			      (titles (mapcar #'symbol-name funs))
 			      (mats (mapcar (lambda (n) (drandom N N)) ns)))
-  (let* ((times (time-functions funs mats avg)))
+  (let* ((times (time-functions funs (mapcar #'list  mats) avg)))
+    (write-gnuplot-scaling filename ns times titles)
+    :end))
+
+(defun ordinary-operators ()
+  '(.+ .- .* ./ .^ ))
+
+(defun ordinary-operators-real ()
+  '(.+ .- .* ./ .^ .max .min .= ./=  .< .> .<= .>=))
+
+(defun report-operator-times (filename &key 
+			      (ns '(1 2 3 4 5 10 20 50 100 150 200 300 400 500))
+			      (avg 10)
+			      (funs (ordinary-operators-real))
+			      (titles (mapcar #'symbol-name funs))
+			      (lmats (mapcar (lambda (n) (drandom N N)) ns))
+			      (rmats lmats))
+  (let* ((times (time-functions funs (mapcar #'list lmats rmats) avg)))
     (write-gnuplot-scaling filename ns times titles)
     :end))




More information about the lisplab-cvs mailing list