the-cost-of-nothing
A set of naïve, yet enlightening benchmarks for Common Lisp.

Repository: https://github.com/marcoheisig/the-cost-of-nothing

Example output

What Lisp system is this?
SBCL 1.3.4, running on a X86-64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz.

What is the cost of allocating objects?
4.65 nanoseconds for allocating conses.
6.74 nanoseconds, plus 0.21 nanoseconds per byte for allocating arrays.
6.97 nanoseconds, plus 2.23 nanoseconds per slot for allocating structs.
17.05 nanoseconds, plus 1.73 nanoseconds per slot for instantiating classes.

What is the cost of garbage collection?
3.12 milliseconds for a normal GC, 33.50 milliseconds for a full GC.

What is the cost of a function call?
2.38 nanoseconds plus 0.57 nanoseconds per argument for calling a DEFUN.
5.13 nanoseconds plus 880.00 microseconds per argument for calling a DEFMETHOD.

What is the cost of FINDing things?
6.97 nanoseconds per character of a string.
8.49 nanoseconds per item in a list.
10.63 nanoseconds per element of of a vector.

What is the cost of a hash table lookup?
27.66 nanoseconds for an EQ hash table.
39.10 nanoseconds for an EQL hash table.
38.15 nanoseconds plus 0.28 nanoseconds per cons for an EQUAL hash table.
50.54 nanoseconds plus 0.85 nanoseconds per cons for an EQUALP hash table.

How many floating-point operations can this system do per second?
5.37 gigaFLOPS in single precision and 5.37 gigaFLOPS in double precision.

Benchmark