Benchmarks

The following tables show benchmarks that compare Ripserer's performance with Ripser, Cubical Ripser, and Eirene.jl. The benchmarking code and more info about the datasets are available here.

All benchmarks were performed on a laptop with an Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz with 8GB of RAM.

We used BenchmarkTools.jl to perform the timing benchmarks and Valgrind's Massif tool to measure peak heap sizes (i.e. total memory footprint).

The benchmarks were performed with Ripserer v0.15, master versions of Ripser (commit hash 286d369) and Cubical Ripser (commit hashes 6edb9c5 for 2D and a063dac for 3D), and Eirene v1.3.5.

The timings show the minimum time taken among five runs of the benchmark.

The heap sizes for Ripserer include the Julia runtime.

Comparison with Ripser

In this experiment, we performed benchmarks with the datasets presented in the Ripser article. We only used the datasets that we were able to run with less than 8GB memory. All datasets were parsed as Float32 as that is what Ripser supports. The time it takes to parse a file is included for both Ripser and Ripserer.

Dense results

datasetsizedimthresholdRipsererRipserratioRipserer heapRipser heap
o3_1024102431.84.576 s3.057 s1.497374.1 MiB151.0 MiB
o3_4096409631.4151.527 s76.177 s1.9894.7 GiB4.1 GiB
dragon2000200013.133 s2.833 s1.106316.7 MiB296.8 MiB
fract-r512222.807 s19.482 s1.1712.2 GiB2.0 GiB
random165028 ms10 ms0.803111.1 MiB1.1 MiB
sphere_3_19219221.549 s1.491 s1.039287.0 MiB209.5 MiB

Sparse results

These benchmarks were performed with the sparse=true keyword argument.

datasetsizedimthresholdRipsererRipserratioRipserer heapRipser heap
o3_1024102431.83.036 s3.057 s0.993418.2 MiB151.0 MiB
o3_4096409631.476.052 s76.177 s0.9984.9 GiB4.1 GiB
dragon2000200013.588 s2.833 s1.267350.4 MiB296.8 MiB
fract-r512225.399 s19.482 s1.3042.2 GiB2.0 GiB
random165029 ms10 ms0.932111.1 MiB1.1 MiB
sphere_3_19219221.734 s1.491 s1.163288.5 MiB209.5 MiB

Alpha-Rips

These benchmarks were performed on sparse matrices that correspond to the 1-skeleta of Delaunay triangulations. The purpose of these is to show performance with very sparse inputs.

datasetsizedimRipsererRipserratioRipserer heapRipser heap
alpha_3_sphere_300030003636 ms789 ms0.807138.4 MiB33.2 MiB
alpha_torus_10_000100002872 ms1.179 s0.741130.0 MiB27.7 MiB
alpha_5_sphere_10001000549.431 s46.707 s1.058387.2 MiB202.0 MiB
alpha_dragon_20002000256 ms76 ms0.7442.4 GiB1.5 GiB
alpha_4_sphere_2000200045.844 s6.203 s0.942110.9 MiB33.2 MiB

Comparison with Cubical Ripser

In these benchmarks, we used some of the datasets presented in the Cubical Ripser article. We limited the 2D image size to 1999×999 as the current master (commit hash 6edb9c5) version of 2D Cubical Ripser throws an assertion error for anything larger. We were also unable to perform 3D 256×256×256 image benchmarks due to Ripserer running out of memory. The eltype of all datasets is Float64, because that is what Cubical Ripser supports. When running Ripserer in the real world, it's a good idea to use the image's native data types. This will slightly reduce the memory footprint and increase performance.

datasetsizedimRipsererCubical RipserratioRipserer heapCubical Ripser heap
lena5122621441787 ms299 ms2.631145.0 MiB49.3 MiB
lena1999x999199700112.87 s2.009 s1.429514.4 MiB186.7 MiB
bonsai6426214422.875 s2.996 s0.96280.6 MiB1.3 GiB
bonsai1282097152231.151 s14.733 s2.1141.5 GiB1.9 GiB
head1282097152224.102 s12.434 s1.9381.5 GiB1.9 GiB

Comparison with Eirene

In these benchmarks, we compare Ripserer to Eirene.jl. Ripserer benchmarks were run with alg=:involuted, so this measures the time it takes to compute representative cycles.

datasetsizedimthresholdRipsererEireneratio
gcycle10036.231 s24.158 s0.258
hiv108811.824 s7.774 s0.235
dragon100010001575 ms8.441 s0.068
celegans29724.217 s4.588 s0.919
o3_1024102431.85.735 s8.314 s0.69
random165078.577 s7.688 s1.116