the-cost-of-nothing

2017-05-16

A LISP programmer knows the value of everything, but the cost of nothing.

--- Alan Perlis

These are some portable benchmarks and tests to estimate the cost of individual Common Lisp operations on the given platform and implementation. I hope you find it useful.

Usage

To run all benchmarks, simply execute

(asdf:test-system :the-cost-of-nothing)

To obtain the execution time of an expression in seconds, type

(benchmark EXPRESSION)

To measure only certain parts of an expression, type

(nested-benchmark
  (foo)
  (bar)
  (benchmark SUBEXPRESSION1)
  (let ((a (baz)))
    (benchmark SUBEXPRESSION2)))
Furthermore the library exports the following functions
  • MEASURE-EXECUTION-TIME
  • MEASURE-EXECUTION-TIME-OF-THUNK

Final Remark

Please do not forget

There are lies, damned lies, and benchmarks.

Author
Marco Heisig <marco.heisig@fau.de>
License
GPLv3
Categories
benchmark