X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=benchmarks%2Fallocation.lisp;fp=benchmarks%2Fallocation.lisp;h=cb8ff42e5e37cf83cf49caf292b609ba20c719bf;hb=72190043201239567658cfbae1c36bbd7233419b;hp=38b7d09cae2dc8b87b1452d32b9002dba13bf0ba;hpb=da9ef130a96ba9102fc0cf68b1fe8cd0a90e67b7;p=uffi.git diff --git a/benchmarks/allocation.lisp b/benchmarks/allocation.lisp index 38b7d09..cb8ff42 100644 --- a/benchmarks/allocation.lisp +++ b/benchmarks/allocation.lisp @@ -19,7 +19,7 @@ (defun stk-int () #+allegro - (ff:with-stack-fobject (ptr :int) + (ff:with-stack-fobject (ptr :int) (setf (ff:fslot-value ptr) 0)) #+lispworks (fli:with-dynamic-foreign-objects ((ptr :int)) @@ -63,7 +63,7 @@ #+cmu (let ((ptr (alien:make-alien (alien:signed 32)))) (declare ;;(type (alien (* (alien:unsigned 32))) ptr) - (dynamic-extent ptr)) + (dynamic-extent ptr)) (setf (alien:deref ptr) 0) (alien:free-alien ptr)) #+sbcl @@ -88,13 +88,13 @@ #+cmu (let ((ptr (alien:make-alien (alien:array (alien:signed 32) 10)))) (declare ;;(type (alien (* (alien:unsigned 32))) ptr) - (dynamic-extent ptr)) + (dynamic-extent ptr)) (setf (alien:deref ptr 5) 0) (alien:free-alien ptr)) #+sbcl (let ((ptr (sb-alien:make-alien (sb-alien:array (sb-alien:signed 32) 10)))) (declare ;;(type (sb-alien (* (sb-alien:unsigned 32))) ptr) - (dynamic-extent ptr)) + (dynamic-extent ptr)) (setf (sb-alien:deref ptr 5) 0) (sb-alien:free-alien ptr)) ) @@ -102,25 +102,25 @@ (defun stk-vs-stat () (format t "~&Stack allocation, Integer") - (time (dotimes (i 1000) - (dotimes (j 1000) - (stk-int)))) + (time (dotimes (i 1000) + (dotimes (j 1000) + (stk-int)))) (format t "~&Static allocation, Integer") - (time (dotimes (i 1000) - (dotimes (j 1000) - (stat-int)))) + (time (dotimes (i 1000) + (dotimes (j 1000) + (stat-int)))) (format t "~&Stack allocation, Vector") - (time (dotimes (i 1000) - (dotimes (j 1000) - (stk-int)))) + (time (dotimes (i 1000) + (dotimes (j 1000) + (stk-int)))) (format t "~&Static allocation, Vector") - (time (dotimes (i 1000) - (dotimes (j 1000) - (stat-int)))) + (time (dotimes (i 1000) + (dotimes (j 1000) + (stat-int)))) ) (stk-vs-stat) - +