Skip to content
Adam

Benchmarks

Adam's benchmark kernels built at each optimization level, timed beside their C twins (clang -O2). x = Adam time / C time: lower is better, 1.00 is C.

adam
0.2.0
CPU
12th Gen Intel(R) Core(TM) i5-12400F
Threads
12
OS
Windows 10.0.26300
Memory
32 GB
Method
best of 5 runs x 3 processes per kernel

x86_64-windows-gnu

debug
x3.09
geometric mean vs C
safe
x1.51
geometric mean vs C
best
fast
x1.34
geometric mean vs C
small
x1.53
geometric mean vs C

Best level: fast at x1.34 of C.

✓ every checksum matches C at every level
debug safe fast small
fib fib debug: x1.65 x1.65 fib safe: x1.67 x1.67 fib fast: x1.12 x1.12 fib small: x1.64 x1.64 sieve sieve debug: x2.76 x2.76 sieve safe: x1.41 x1.41 sieve fast: x1.23 x1.23 sieve small: x1.91 x1.91 sort sort debug: x2.03 x2.03 sort safe: x1.50 x1.50 sort fast: x1.30 x1.30 sort small: x1.44 x1.44 matmul matmul debug: x5.77 x5.77 matmul safe: x3.03 x3.03 matmul fast: x1.83 x1.83 matmul small: x1.88 x1.88 nbody nbody debug: x2.39 x2.39 nbody safe: x0.95 x0.95 nbody fast: x0.95 x0.95 nbody small: x0.95 x0.95 strings strings debug: x7.93 x7.93 strings safe: x1.62 x1.62 strings fast: x1.61 x1.61 strings small: x1.83 x1.83 cvt cvt debug: x2.03 x2.03 cvt safe: x1.01 x1.01 cvt fast: x1.00 x1.00 cvt small: x1.02 x1.02 spill spill debug: x2.03 x2.03 spill safe: x1.16 x1.16 spill fast: x1.16 x1.16 spill small: x1.34 x1.34 pressure pressure debug: x4.05 x4.05 pressure safe: x1.00 x1.00 pressure fast: x1.00 x1.00 pressure small: x1.00 x1.00 alloc alloc debug: x7.72 x7.72 alloc safe: x1.77 x1.77 alloc fast: x1.48 x1.48 alloc small: x1.74 x1.74 collections collections debug: x2.51 x2.51 collections safe: x1.93 x1.93 collections fast: x1.82 x1.82 collections small: x1.97 x1.97 closures closures debug: x4.14 x4.14 closures safe: x1.73 x1.73 closures fast: x1.70 x1.70 closures small: x1.74 x1.74 generics generics debug: x3.31 x3.31 generics safe: x2.20 x2.20 generics fast: x1.74 x1.74 generics small: x2.48 x2.48 parallel parallel debug: x1.66 x1.66 parallel safe: x1.26 x1.26 parallel fast: x1.25 x1.25 parallel small: x1.26 x1.26 C = 1.00

Kernels (microseconds)

KernelCdebugxsafexfastxsmallxCheck
fib495281471.6582901.6755411.1281031.64✓
sieve34450951232.76486391.41423931.23658421.91✓
sort1472182981792.032213461.501920861.302119971.44✓
matmul2832163355.7785703.0351711.8353201.88✓
nbody631311506342.39596810.95598650.95601080.95✓
strings668505298437.931082551.621077091.611224801.83✓
cvt20219409582.03204381.01202271.00205971.02✓
spill35600723372.03413231.16411341.16475321.34✓
pressure1221404951724.051222151.001220621.001220461.00✓
alloc1135898764257.722006661.771677261.481981561.74✓
collections25258635142.51486521.93460861.82496671.97✓
closures15863656084.14273641.73270281.70276421.74✓
generics726582404933.311600972.201265221.741799102.48✓
parallel229338111.6628981.2628611.2528941.26✓

Builds

LevelBuild (ms)Exe (bytes)
debug843839 168
safe890175 104
fast968204 800
small813141 824

x86_64-linux-gnu

debug
x3.09
geometric mean vs C
safe
x1.43
geometric mean vs C
best
fast
x1.27
geometric mean vs C
small
x1.50
geometric mean vs C

Best level: fast at x1.27 of C.

✓ every checksum matches C at every level
debug safe fast small
fib fib debug: x1.44 x1.44 fib safe: x1.48 x1.48 fib fast: x1.12 x1.12 fib small: x1.48 x1.48 sieve sieve debug: x2.84 x2.84 sieve safe: x1.26 x1.26 sieve fast: x1.25 x1.25 sieve small: x1.94 x1.94 sort sort debug: x2.01 x2.01 sort safe: x1.41 x1.41 sort fast: x1.34 x1.34 sort small: x1.42 x1.42 matmul matmul debug: x5.35 x5.35 matmul safe: x2.64 x2.64 matmul fast: x1.71 x1.71 matmul small: x1.75 x1.75 nbody nbody debug: x2.43 x2.43 nbody safe: x0.87 x0.87 nbody fast: x0.87 x0.87 nbody small: x0.94 x0.94 strings strings debug: x10.92 x10.92 strings safe: x1.54 x1.54 strings fast: x1.47 x1.47 strings small: x2.07 x2.07 cvt cvt debug: x2.00 x2.00 cvt safe: x0.91 x0.91 cvt fast: x0.92 x0.92 cvt small: x0.99 x0.99 spill spill debug: x1.49 x1.49 spill safe: x1.06 x1.06 spill fast: x1.01 x1.01 spill small: x1.42 x1.42 pressure pressure debug: x2.95 x2.95 pressure safe: x0.91 x0.91 pressure fast: x0.91 x0.91 pressure small: x0.92 x0.92 alloc alloc debug: x15.56 x15.56 alloc safe: x2.84 x2.84 alloc fast: x2.04 x2.04 alloc small: x2.80 x2.80 collections collections debug: x2.33 x2.33 collections safe: x1.75 x1.75 collections fast: x1.54 x1.54 collections small: x1.65 x1.65 closures closures debug: x3.33 x3.33 closures safe: x1.33 x1.33 closures fast: x1.23 x1.23 closures small: x1.25 x1.25 generics generics debug: x3.39 x3.39 generics safe: x2.24 x2.24 generics fast: x1.71 x1.71 generics small: x2.31 x2.31 parallel parallel debug: x1.72 x1.72 parallel safe: x1.27 x1.27 parallel fast: x1.17 x1.17 parallel small: x1.19 x1.19 C = 1.00

Kernels (microseconds)

KernelCdebugxsafexfastxsmallxCheck
fib520675051.4476881.4858481.1277151.48✓
sieve33819962012.84427231.26421531.25654461.94✓
sort1468162946002.012071071.411968721.342082391.42✓
matmul3143168095.3583002.6453631.7154941.75✓
nbody639221555852.43553360.87558690.87601560.94✓
strings3934242951110.92607811.54578601.47814062.07✓
cvt20248405132.00185220.91185920.92201370.99✓
spill44978668801.49476521.06454441.01636991.42✓
pressure1543924560632.951411620.911411870.911424480.92✓
alloc4108663920915.561166402.84836172.041150492.80✓
collections24602572252.33430261.75379961.54405321.65✓
closures16968564873.33224961.33209071.23211411.25✓
generics713422417513.391599942.241222971.711647582.31✓
parallel253343571.7232071.2729561.1730211.19✓

Builds

LevelBuild (ms)Exe (bytes)
debug797918 096
safe875232 784
fast984258 312
small782201 936

Measured by adam 0.2.0 with adam bench. Every release ships the suite in res/bench: run it on your own machine.