Sun Jan 10 11:16:40 CET 2010 Tobias Rautenkranz * ASDF & modular smoke. diff -rN -u old-benchmark/benchmark.lisp new-benchmark/benchmark.lisp --- old-benchmark/benchmark.lisp 2014-10-30 07:06:36.000000000 +0100 +++ new-benchmark/benchmark.lisp 2014-10-30 07:06:36.000000000 +0100 @@ -27,11 +27,12 @@ (defun write-lisp-info (file) (write-R-table `((:type ,(lisp-implementation-type) - :version ,(lisp-implementation-version) - :arch ,(machine-type) - :os ,(software-type) - :os-version ,(software-version) - :cl-smoke-version ,(mb.sysdef::version-string (mb.sysdef:version-of (mb.sysdef:find-system :smoke))))) + :version ,(lisp-implementation-version) + :arch ,(machine-type) + :os ,(software-type) + :os-version ,(software-version) + :cl-smoke-version ,(format nil "~{~A~^.~}" + (asdf:component-version (asdf:find-system :cl-smoke.smoke))))) file)) (defun benchmark (function iterations) @@ -68,7 +69,7 @@ (run-compare "simple-call" #'simple-call #'cl-smoke-benchmark-simple-call 10000 3000) (run-compare "simple-call-compile-time" #'simple-call-compile-time - #'cl-smoke-benchmark-simple-call 10000 3000) + #'cl-smoke-benchmark-simple-call 10000 1000) (when construct (with-benchmark-cxx-construct ((* 50 1000)) (run-compare "construct" #'construct diff -rN -u old-benchmark/benchmark.sh new-benchmark/benchmark.sh --- old-benchmark/benchmark.sh 2014-10-30 07:06:36.000000000 +0100 +++ new-benchmark/benchmark.sh 2014-10-30 07:06:36.000000000 +0100 @@ -1,5 +1,7 @@ #!/bin/sh rm -- *.dat -sbcl --eval "(mb:load :cl-smoke.benchmark)" --eval "(cl-smoke.benchmark:run)" --eval "(quit)" || exit 1 +sbcl --eval "(require :cl-smoke.benchmark)" \ + --eval "(cl-smoke.benchmark:run)" \ + --eval "(quit)" || exit 1 R --no-save < ./plot.R > /dev/null diff -rN -u old-benchmark/cl-smoke.benchmark.mbd new-benchmark/cl-smoke.benchmark.mbd --- old-benchmark/cl-smoke.benchmark.mbd 2014-10-30 07:06:36.000000000 +0100 +++ new-benchmark/cl-smoke.benchmark.mbd 1970-01-01 01:00:00.000000000 +0100 @@ -1,33 +0,0 @@ -;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- - - -;;; SYSDEF.CMAKE -(defpackage :sysdef.cmake - (:use :cl :sysdef) - (:export :cmake-file :cmake-library)) - -(in-package :sysdef.cmake) -(defclass sysdef.cmake:cmake-file (source-file) - () - (:default-initargs :type "txt")) - -(defclass sysdef.cmake:cmake-library (component) - ()) -;;; end SYSDEF.CMAKE - -(in-package :sysdef-user) -(eval-when (:compile-toplevel :load-toplevel :execute) - (use-package :sysdef.cmake)) - -(define-system :cl-smoke.benchmark () - (:version 0 0 1) - (:documentation "Benchmark cl-smoke agains C++.") - (:serial t) - (:components - "package" - ("CMakeLists" sysdef.cmake:cmake-file) - ("libcl-smoke-benchmark" sysdef.cmake:cmake-library) - "cxx" - "lisp-benchmark" - "benchmark") - (:needs :qt :cffi :sysdef.cmake :trivial-garbage)) diff -rN -u old-benchmark/cxx.lisp new-benchmark/cxx.lisp --- old-benchmark/cxx.lisp 2014-10-30 07:06:36.000000000 +0100 +++ new-benchmark/cxx.lisp 2014-10-30 07:06:36.000000000 +0100 @@ -1,6 +1,13 @@ (in-package :cl-smoke.benchmark) -(use-foreign-library libcl-smoke-benchmark) +(define-foreign-library libcl-smoke-benchmark + (t (:default "libcl-smoke-benchmark"))) + +(let ((*foreign-library-directories* + (cons (asdf:component-pathname (asdf:find-system :cl-smoke.benchmark)) + *foreign-library-directories*))) + (use-foreign-library libcl-smoke-benchmark)) + (defctype size-t :unsigned-int) (declaim (inline cl-smoke-benchmark-byte-array-size)) diff -rN -u old-benchmark/lisp-benchmark.lisp new-benchmark/lisp-benchmark.lisp --- old-benchmark/lisp-benchmark.lisp 2014-10-30 07:06:36.000000000 +0100 +++ new-benchmark/lisp-benchmark.lisp 2014-10-30 07:06:36.000000000 +0100 @@ -36,7 +36,7 @@ (defun signal-slot (iterations) (declare (fixnum iterations) (optimize (speed 3))) - (let ((my-signal (make-instance 'cl-smoke.qt-impl::qsignal :argument-types nil))) + (let ((my-signal (make-instance 'cl-smoke.qt.core::qsignal :argument-types nil))) (declare (function my-signal)) (qt:connect my-signal #'(lambda ())) diff -rN -u old-benchmark/plot.R new-benchmark/plot.R --- old-benchmark/plot.R 2014-10-30 07:06:36.000000000 +0100 +++ new-benchmark/plot.R 2014-10-30 07:06:36.000000000 +0100 @@ -36,11 +36,6 @@ title("Simple Call", paste(info$TYPE[1], info$VERSION[1], "on", info$OS[1], info$OS.VERSION[1])) -cxx_simple_call <- read.table("cxx-simple-call-compile-time.dat", header=TRUE) -simple_call <- read.table("simple-call-compile-time.dat", header=TRUE) -boxplot_benchmark(simple_call, cxx_simple_call) -title("Simple Call with overload resolution at compile time.") - cxx_inline_call <- read.table("cxx-inline-call.dat", header=TRUE) inline_call <- read.table("inline-call.dat", header=TRUE) boxplot_benchmark(inline_call, cxx_inline_call)