From ee5f3dc7c5644ec693703465e3884246a1434350 Mon Sep 17 00:00:00 2001 From: Izaak Walton Date: Thu, 3 Oct 2024 22:34:36 -0700 Subject: [PATCH] Converting benchmark suite to new benchmarking --- benchmarks/benchmarking.lisp | 28 ++-- benchmarks/big-float.lisp | 110 ++++++++------- benchmarks/fibonacci.lisp | 152 ++++++++++++--------- benchmarks/gabriel-benchmarks/gabriel.lisp | 0 benchmarks/gabriel-benchmarks/package.lisp | 18 +++ benchmarks/gabriel-benchmarks/stak.lisp | 63 +++++---- benchmarks/gabriel-benchmarks/tak.lisp | 22 +-- benchmarks/gabriel-benchmarks/takl.lisp | 79 +++++------ benchmarks/gabriel-benchmarks/takr.lisp | 48 ++++--- benchmarks/package.lisp | 44 +++--- coalton.asd | 17 +-- 11 files changed, 327 insertions(+), 254 deletions(-) create mode 100644 benchmarks/gabriel-benchmarks/gabriel.lisp create mode 100644 benchmarks/gabriel-benchmarks/package.lisp diff --git a/benchmarks/benchmarking.lisp b/benchmarks/benchmarking.lisp index ef846ddb4..70f43e5f7 100644 --- a/benchmarks/benchmarking.lisp +++ b/benchmarks/benchmarking.lisp @@ -17,7 +17,10 @@ #:find-benchmark #:find-package-benchmarks #:run-benchmark - #:run-package-benchmarks)) + #:run-package-benchmarks + + #:import-benchmarks + #:reexport-benchmarks)) (in-package #:coalton-benchmarking) @@ -155,17 +158,24 @@ (define (run-package-benchmarks name) "Runs all benchmarks for a package" + (let system = (benchmark-system-info)) + (let sys-str = (as String system)) + (when *verbose-benchmarking* + (print + (lisp String (name sys-str) + (cl:format cl:nil "Package '~a' Benchmark Results~%System:~a" + name + sys-str)))) (let results = (vec:new)) (for b in (find-package-benchmarks name) + (let res = (%run-benchmark b)) + (when *verbose-benchmarking* + (print res)) (vec:push! (%run-benchmark b) results)) - (let package-results = (PackageBenchmarkResults - name - (benchmark-system-info) - results)) - (if *verbose-benchmarking* - (progn (print package-results) - package-results) - package-results))) + (PackageBenchmarkResults + name + system + results))) ;;; ;;; Allow importing of benchmarks into other packages, for the sake of building package-per-file benchmark hierarchies. diff --git a/benchmarks/big-float.lisp b/benchmarks/big-float.lisp index f044ee3aa..c5392fb32 100644 --- a/benchmarks/big-float.lisp +++ b/benchmarks/big-float.lisp @@ -2,7 +2,22 @@ ;;;; ;;;; Benchmarks for arbitrary precision floats -(cl:in-package #:coalton-benchmarks) +(defpackage #:coalton-benchmarks/big-float + (:use + #:coalton + #:coalton-prelude + #:coalton-benchmarking + #:coalton-library/big-float) + (:local-nicknames + (#:math #:coalton-library/math)) + (:export + #:big-trig + #:big-inv-trig + #:big-ln-exp + #:big-sqrt + #:big-mult-constants)) + +(cl:in-package #:coalton-benchmarks/big-float) (cl:defvar *big-float-bench-precision* #-coalton-portable-bigfloat 10000 @@ -11,57 +26,19 @@ #-coalton-portable-bigfloat 1000 #+coalton-portable-bigfloat 10) -(define-benchmark big-trig () - "Benchmark at N precision big-float trigonometric functions." - (declare (optimize speed)) - (loop :repeat *big-float-bench-iterations* - :do (with-benchmark-sampling - (coalton-benchmarks/native::big-trig - *big-float-bench-precision* - (* (- (random 2)) (random 100.0d0))))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark big-inv-trig () - "Benchmark at N precision big-float inverse trigonometric functions." - (declare (optimize speed)) - (loop :repeat *big-float-bench-iterations* - :do (with-benchmark-sampling - (coalton-benchmarks/native::big-inv-trig - *big-float-bench-precision* - (* (- (random 2)) (random 1.0d0))))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark big-ln-exp () - "Benchmark at N precision big-float ln and exp." - (declare (optimize speed)) - (loop :repeat *big-float-bench-iterations* - :do (with-benchmark-sampling - (coalton-benchmarks/native::big-ln-exp - *big-float-bench-precision* - (* (- (random 2)) (random 100.0d0))))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark big-sqrt () - "Benchmark at N precision big-float square roots." - (declare (optimize speed)) - (loop :repeat *big-float-bench-iterations* - :do (with-benchmark-sampling - (coalton-benchmarks/native::big-sqrt - *big-float-bench-precision* - (random 100.0d0)))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark big-mult-constants () - "Benchmark at N precision big-float multiplication of pi and euler's number." - (declare (optimize speed)) - (loop :repeat *big-float-bench-iterations* - :do (with-benchmark-sampling - (coalton-benchmarks/native::big-sqrt - *big-float-bench-precision* - (* (- (random 2)) (random 100.0d0))))) - (report trivial-benchmark::*current-timer*)) - -(cl:in-package #:coalton-benchmarks/native) +(coalton-toplevel + (define (big-float-bench-precision) + (lisp UFix () + *big-float-bench-precision*)) + + (define (big-float-bench-iterations) + (lisp UFix () + *big-float-bench-iterations*))) + +(coalton-toplevel + (define (random-double-float) + (lisp Double-Float () + (cl:* (cl:- (cl:random 2)) (cl:random 100.0d0))))) (cl:declaim (cl:optimize (cl:speed 3) (cl:safety 1))) @@ -98,4 +75,31 @@ (with-precision n (fn () (let x = (into x)) - (* x (* pi ee)))))) + (* x (* math:pi math:ee)))))) + +(coalton-toplevel + + (declare define-big-float-benchmark (String + -> (UFix -> Double-Float -> Big-Float) + -> Unit)) + (define (define-big-float-benchmark name f) + (define-benchmark name (big-float-bench-iterations) + (fn () + (f (big-float-bench-precision) + (random-double-float)) + Unit)))) + +(coalton + (define-big-float-benchmark "big-trig" big-trig)) + +(coalton + (define-big-float-benchmark "big-inv-trig" big-inv-trig)) + +(coalton + (define-big-float-benchmark "big-ln-exp" big-ln-exp)) + +(coalton + (define-big-float-benchmark "big-sqrt" big-sqrt)) + +(coalton + (define-big-float-benchmark "big-mult-constants" big-mult-constants)) diff --git a/benchmarks/fibonacci.lisp b/benchmarks/fibonacci.lisp index 222c1c68f..67875d1d1 100644 --- a/benchmarks/fibonacci.lisp +++ b/benchmarks/fibonacci.lisp @@ -2,75 +2,46 @@ ;;;; ;;;; Benchmarks for different methods of generating fibonacci numbers -(cl:in-package #:coalton-benchmarks) - -(define-benchmark recursive-fib () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:fib 20))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark recursive-fib-generic () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:fib-generic-wrapped 20))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark recursive-fib-lisp () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (lisp-fib 20))) - (report trivial-benchmark::*current-timer*)) - - -(define-benchmark recursive-fib-monomorphized () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:fib-monomorphized 20))) - (report trivial-benchmark::*current-timer*)) - -;; -;; Benchmarks on optional are disabled by default because they compute the 10th -;; instead of the 20th fibonacci number. Computing the 20th was exhausting the heap. -;; - -#+ignore -(define-benchmark recursive-fib-generic-optional () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:fib-generic-optional 10))) - (report trivial-benchmark::*current-timer*)) - -#+ignore -(define-benchmark recursive-fib-monomorphized-optional () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:fib-monomorphized-optional 10))) - (report trivial-benchmark::*current-timer*)) - -(defun lisp-fib (n) - (declare (type integer n) - (values integer) - (optimize (speed 3) (safety 0))) - (when (= n 0) - (return-from lisp-fib 0)) - - (when (= n 1) - (return-from lisp-fib 1)) - - (+ (lisp-fib (- n 1)) (lisp-fib (- n 2)))) - -(cl:in-package #:coalton-benchmarks/native) +(defpackage #:coalton-benchmarks/fibonacci + (:use + #:coalton + #:coalton-prelude + #:coalton-benchmarking) + (:export + #:lisp-fib + #:fib + #:fib-generic + #:fib-generic-wrapped + #:fib-monomorphized + #:fib-optional + #:fib-monomorphized-optional)) + +(in-package #:coalton-benchmarks/fibonacci) + +;;; +;;; Lisp fibonacci +;;; + +(cl:defun lisp-fib (n) + (cl:declare (cl:type cl:integer n) + (cl:values cl:integer) + (cl:optimize (cl:speed 3) (cl:safety 0))) + (cl:when (cl:= n 0) + (cl:return-from lisp-fib 0)) + + (cl:when (cl:= n 1) + (cl:return-from lisp-fib 1)) + + (cl:+ (lisp-fib (cl:- n 1)) (lisp-fib (cl:- n 2)))) + +;;; +;;; Coalton fibonacci +;;; (cl:declaim (cl:optimize (cl:speed 3) (cl:safety 0))) (coalton-toplevel + (declare fib (Integer -> Integer)) (define (fib n) (when (== n 0) @@ -108,3 +79,54 @@ (declare fib-monomorphized-optional (Integer -> Optional Integer)) (define (fib-monomorphized-optional x) (fib-generic (Some x)))) + +;;; +;;; Benchmarks +;;; + +(coalton + (define-benchmark "recursive-fib" 1000 + (fn () + (fib 20) + Unit))) + +(coalton + (define-benchmark "recursive-fib-generic" 1000 + (fn () + (fib-generic-wrapped 20) + Unit))) + +(coalton + (define-benchmark "recursive-fib-lisp" 1000 + (fn () + (lisp Unit () + (lisp-fib 20) + Unit)))) + +(coalton + (define-benchmark "recursive-fib-monomorphized" 1000 + (fn () + (lisp Unit () + (fib-monomorphized 20) + Unit)))) + +;; +;; Benchmarks on optional are disabled by default because they compute the 10th +;; instead of the 20th fibonacci number. Computing the 20th was exhausting the heap. +;; + +#+ignore +(define-benchmark recursive-fib-generic-optional () + (declare (optimize speed)) + (loop :repeat 1000 + :do (with-benchmark-sampling + (coalton-benchmarks/native:fib-generic-optional 10))) + (report trivial-benchmark::*current-timer*)) + +#+ignore +(define-benchmark recursive-fib-monomorphized-optional () + (declare (optimize speed)) + (loop :repeat 1000 + :do (with-benchmark-sampling + (coalton-benchmarks/native:fib-monomorphized-optional 10))) + (report trivial-benchmark::*current-timer*)) diff --git a/benchmarks/gabriel-benchmarks/gabriel.lisp b/benchmarks/gabriel-benchmarks/gabriel.lisp new file mode 100644 index 000000000..e69de29bb diff --git a/benchmarks/gabriel-benchmarks/package.lisp b/benchmarks/gabriel-benchmarks/package.lisp new file mode 100644 index 000000000..9f7d1bf54 --- /dev/null +++ b/benchmarks/gabriel-benchmarks/package.lisp @@ -0,0 +1,18 @@ +(uiop:define-package #:coalton-benchmarks/gabriel + (:use + #:coalton + #:coalton-prelude + #:coalton-benchmarking) + (:mix-reexport + #:coalton-benchmarks/gabriel/tak + #:coalton-benchmarks/gabriel/takr + #:coalton-benchmarks/gabriel/stak + #:coalton-benchmarks/gabriel/takl)) + +(in-package #:coalton-benchmarks/gabriel) + +(coalton (reexport-benchmarks + (make-list "coalton-benchmarks/gabriel/tak" + "coalton-benchmarks/gabriel/takr" + "coalton-benchmarks/gabriel/stak" + "coalton-benchmarks/gabriel/takl"))) diff --git a/benchmarks/gabriel-benchmarks/stak.lisp b/benchmarks/gabriel-benchmarks/stak.lisp index 89377e558..63d518b16 100644 --- a/benchmarks/gabriel-benchmarks/stak.lisp +++ b/benchmarks/gabriel-benchmarks/stak.lisp @@ -2,59 +2,51 @@ ;;;; ;;;; -(in-package #:coalton-benchmarks) +(defpackage #:coalton-benchmarks/gabriel/stak + (:use + #:coalton + #:coalton-prelude + #:coalton-benchmarking) + (:export + #:lisp-stak + #:stak)) -(define-benchmark stak () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:stak 18 12 6))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark stak-lisp () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (lisp-stak 18 12 6))) - (report trivial-benchmark::*current-timer*)) +(in-package #:coalton-benchmarks/gabriel/stak) ;;; ;;; ;;; -(defvar x) -(defvar y) -(defvar z) +(cl:defvar x) +(cl:defvar y) +(cl:defvar z) -(declaim (ftype (function () fixnum) stak-aux)) -(defun stak-aux () - (if (not (< y x)) +(cl:declaim (cl:ftype (cl:function () cl:fixnum) stak-aux)) +(cl:defun stak-aux () + (cl:if (cl:not (cl:< y x)) z - (let ((x (let ((x (1- x)) + (cl:let ((x (cl:let ((x (cl:1- x)) (y y) (z z)) (stak-aux))) - (y (let ((x (1- y)) + (y (cl:let ((x (cl:1- y)) (y z) (z x)) (stak-aux))) - (z (let ((x (1- z)) + (z (cl:let ((x (cl:1- z)) (y x)(z y)) (stak-aux)))) (stak-aux)))) -(declaim (ftype (function (fixnum fixnum fixnum) fixnum) lisp-stak)) -(defun lisp-stak (x y z) +(cl:declaim (cl:ftype (cl:function (cl:fixnum cl:fixnum cl:fixnum) cl:fixnum) lisp-stak)) +(cl:defun lisp-stak (x y z) (stak-aux)) ;;; ;;; ;;; - -(cl:in-package #:coalton-benchmarks/native) - (cl:declaim (cl:optimize (cl:speed 3) (cl:safety 0))) (coalton-toplevel @@ -76,3 +68,18 @@ (z2 y)) (stak x2 y2 z2)))) (stak x1 y1 z1))))) + +;; Defining the Coalton benchmark +(coalton + (define-benchmark "stak" 1000 + (fn () + (stak 18 12 6) + Unit))) + +;; Defining the Lisp Benchmark +(coalton + (define-benchmark "lisp-stak" 1000 + (fn () + (lisp Unit () + (lisp-stak 18 12 6) + Unit)))) diff --git a/benchmarks/gabriel-benchmarks/tak.lisp b/benchmarks/gabriel-benchmarks/tak.lisp index 9fd7bf7a0..59716924c 100644 --- a/benchmarks/gabriel-benchmarks/tak.lisp +++ b/benchmarks/gabriel-benchmarks/tak.lisp @@ -1,9 +1,13 @@ ;;;; gabriel-benchmarks/tak.lisp ;;;; (defpackage #:coalton-benchmarks/gabriel/tak - (:use #:coalton - #:coalton-prelude - #:coalton-benchmarking)) + (:use + #:coalton + #:coalton-prelude + #:coalton-benchmarking) + (:export + #:lisp-tak + #:tak)) (in-package #:coalton-benchmarks/gabriel/tak) @@ -11,11 +15,12 @@ ;; Defining the lisp version (cl:declaim (cl:ftype (cl:function (cl:fixnum cl:fixnum cl:fixnum) cl:fixnum) lisp-tak)) (cl:defun lisp-tak (x y z) + (cl:declare (cl:optimize (cl:speed 3) (cl:safety 0))) (cl:if (cl:not (cl:< y x)) - z - (lisp-tak (lisp-tak (cl:1- x) y z) - (lisp-tak (cl:1- y) z x) - (lisp-tak (cl:1- z) x y)))) + z + (lisp-tak (lisp-tak (cl:1- x) y z) + (lisp-tak (cl:1- y) z x) + (lisp-tak (cl:1- z) x y)))) ;; Defining the Coalton version (coalton-toplevel @@ -44,6 +49,3 @@ (lisp Unit () (lisp-tak 18 12 6) Unit)))) - -;; running the package benchmarks: -() diff --git a/benchmarks/gabriel-benchmarks/takl.lisp b/benchmarks/gabriel-benchmarks/takl.lisp index 23e3fdd87..28f571318 100644 --- a/benchmarks/gabriel-benchmarks/takl.lisp +++ b/benchmarks/gabriel-benchmarks/takl.lisp @@ -2,60 +2,49 @@ ;;;; ;;;; -(cl:in-package #:coalton-benchmarks) - -(define-benchmark takl () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:takl 18 12 6))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark takl-lisp () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (lisp-takl 18 12 6))) - (report trivial-benchmark::*current-timer*)) - +(defpackage #:coalton-benchmarks/gabriel/takl + (:use #:coalton + #:coalton-prelude + #:coalton-benchmarking) + (:local-nicknames + (#:list #:Coalton-library/list))) + +(in-package #:coalton-benchmarks/gabriel/takl) ;;; ;;; ;;; -(declaim (ftype (function (fixnum) list) listn)) -(defun listn (n) - (if (not (= 0 n)) - (cons n (listn (1- n))))) +(cl:declaim (cl:ftype (cl:function (cl:fixnum) cl:list) lisp-listn)) +(cl:defun lisp-listn (n) + (cl:if (cl:not (cl:= 0 n)) + (cl:cons n (lisp-listn (cl:1- n))))) -(declaim (ftype (function (list list) boolean))) -(defun shorterp (x y) - (and y (or (null x) - (shorterp (cdr x) - (cdr y))))) +(cl:declaim (cl:ftype (cl:function (cl:list cl:list) cl:boolean) lisp-shorterp)) +(cl:defun lisp-shorterp (x y) + (cl:and y (cl:or (cl:null x) + (lisp-shorterp (cl:cdr x) + (cl:cdr y))))) -(declaim (ftype (function (list list list) list))) -(defun mas (x y z) - (if (not (shorterp y x)) +(cl:declaim (cl:ftype (cl:function (cl:list cl:list cl:list) cl:list) lisp-mas)) +(cl:defun lisp-mas (x y z) + (cl:if (cl:not (lisp-shorterp y x)) z - (mas (mas (cdr x) + (lisp-mas (lisp-mas (cl:cdr x) y z) - (mas (cdr y) + (lisp-mas (cl:cdr y) z x) - (mas (cdr z) + (lisp-mas (cl:cdr z) x y)))) -(declaim (ftype (function (fixnum fixnum fixnum) list))) -(defun lisp-takl (x y z) - (mas (listn x) (listn y) (listn z))) +(cl:declaim (cl:ftype (cl:function (cl:fixnum cl:fixnum cl:fixnum) cl:list) lisp-takl)) +(cl:defun lisp-takl (x y z) + (lisp-mas (lisp-listn x) (lisp-listn y) (lisp-listn z))) ;;; ;;; ;;; - -(cl:in-package #:coalton-benchmarks/native) - -(cl:declaim (cl:optimize (cl:speed 3) (cl:safety 0))) +#+ig(cl:declaim (cl:optimize (cl:speed 3) (cl:safety 0))) (coalton-toplevel @@ -86,3 +75,17 @@ (declare takl (UFix -> UFix -> UFix -> (List UFix))) (define (takl x y z) (mas (listn x) (listn y) (listn z)))) + +(coalton + + (define-benchmark "takl" 2000 + (fn () + (takl 18 12 6) + Unit))) + +(coalton + + (define-benchmark "lisp-takl" 2000 + (fn () + (takl 18 12 6) + Unit))) diff --git a/benchmarks/gabriel-benchmarks/takr.lisp b/benchmarks/gabriel-benchmarks/takr.lisp index a8ce2bb5a..4102a522a 100644 --- a/benchmarks/gabriel-benchmarks/takr.lisp +++ b/benchmarks/gabriel-benchmarks/takr.lisp @@ -2,21 +2,12 @@ ;;;; ;;;; -(cl:in-package #:coalton-benchmarks) - -(define-benchmark takr () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (coalton-benchmarks/native:takr 18 12 6))) - (report trivial-benchmark::*current-timer*)) - -(define-benchmark takr-lisp () - (declare (optimize speed)) - (loop :repeat 1000 - :do (with-benchmark-sampling - (lisp-takr 18 12 6))) - (report trivial-benchmark::*current-timer*)) +(cl:defpackage #:coalton-benchmarks/gabriel/takr-lisp + (:use #:cl) + (:export + #:lisp-takr)) + +(in-package #:coalton-benchmarks/gabriel/takr-lisp) ;;; ;;; @@ -726,8 +717,16 @@ ;;; ;;; +(defpackage #:coalton-benchmarks/gabriel/takr + (:use + #:coalton + #:coalton-prelude + #:coalton-benchmarking + #:coalton-benchmarks/gabriel/takr-lisp) + (:export + #:takr)) -(cl:in-package #:coalton-benchmarks/native) +(in-package #:coalton-benchmarks/gabriel/takr) (cl:declaim (cl:optimize (cl:speed 3) (cl:safety 0))) @@ -1432,3 +1431,20 @@ (True (takr (takr (- x 1) y z) (takr (- y 1) z x) (takr (- z 1) x y)))))) + +;; Defining the Coalton benchmark +(coalton + + (define-benchmark "takr" 1000 + (fn () + (takr 18 12 6) + Unit))) + +;; Defining the Lisp Benchmark +(coalton + + (define-benchmark "lisp-takr" 1000 + (fn () + (lisp Unit () + (lisp-takr 18 12 6) + Unit)))) diff --git a/benchmarks/package.lisp b/benchmarks/package.lisp index 6e3ee4b8c..dcebcd21d 100644 --- a/benchmarks/package.lisp +++ b/benchmarks/package.lisp @@ -2,37 +2,27 @@ ;;;; ;;;; Benchmarks packages and common functions -(benchmark:define-benchmark-package #:coalton-benchmarks - (:export #:run-benchmarks - #:run-benchmarks-ci)) +(uiop:define-package #:coalton-benchmarks + (:use #:coalton + #:coalton-prelude + #:coalton-benchmarking) + (:mix-reexport + #:coalton-benchmarks/fibonacci + #:coalton-benchmarks/big-float + #:coalton-benchmarks/gabriel)) -(cl:defpackage #:coalton-benchmarks/native - (:use - #:coalton - #:coalton-prelude - #:coalton-library/big-float - #:coalton-library/math) - (:local-nicknames (#:list #:coalton-library/list)) - (:export - #:fib - #:fib-fixnum - #:fib-generic-wrapped - #:fib-monomorphized - #:fib-generic-optional - #:fib-monomorphized-optional) +(in-package #:coalton-benchmarks) - ;; gabriel-benchmarks/ - (:export - #:tak - #:stak - #:takl - #:takr)) +(coalton (reexport-benchmarks + (make-list "coalton-benchmarks/fibonacci" + "coalton-benchmarks/big-float" + "coalton-benchmarks/gabriel"))) +(coalton-toplevel -(cl:in-package #:coalton-benchmarks) - -(defun run-benchmarks () - (run-package-benchmarks :package '#:coalton-benchmarks :verbose t)) + (define (run-benchmarks) + (run-package-benchmarks "coalton-benchmarks"))) +#+ig (defun run-benchmarks-ci () (let ((result (run-package-benchmarks :package '#:coalton-benchmarks :verbose t))) (with-open-file (out "bench.json" :direction :output :if-exists :supersede) diff --git a/coalton.asd b/coalton.asd index d0208c97b..0a912be14 100644 --- a/coalton.asd +++ b/coalton.asd @@ -150,21 +150,21 @@ (let (#+sbcl (sb-ext:*derive-function-types* t) #+sbcl (sb-ext:*block-compile-default* :specified)) (funcall compile))) - :depends-on (#:coalton + #:coalton/library/big-float #:coalton/benchmarking) :pathname "benchmarks" :serial t - :components (;(:file "package") - ;(:file "fibonacci") - ;(:file "big-float") + :components ((:file "fibonacci") + (:file "big-float") (:module "gabriel-benchmarks" :serial t :components ((:file "tak") - ;;(:file "stak") - ;;(:file "takl") - ;;(:file "takr") - )))) + (:file "stak") + (:file "takl") + (:file "takr") + (:file "package"))) + (:file "package"))) ;;; we need to inspect the sbcl version in order to decide which version of the hashtable shim to load, ;;; because 2.1.12 includes (or will include) a bugfix that allows a cleaner, more maintainable @@ -219,6 +219,7 @@ :author "Coalton contributors (https://github.com/coalton-lang/coalton)" :license "MIT" :depends-on (#:coalton + #:coalton/library/computable-reals #:coalton/library/big-float #:coalton/testing #:fiasco