Skip to content

C++ Ripser: ordinary Rips barcodes

Ulrich Bauer's Ripser specializes in computing Vietoris–Rips persistence barcodes, with algorithms designed to keep the calculation fast while using little memory. We chose the original C++ executable as a comparison for TamerOp's direct Rips computations: both programs start from distances and return the intervals describing when homology classes appear and disappear. The study below measures larger barcode requests using the results of 6 October 2026.

Results

TamerOp was about 1.8× as fast on the two circle inputs. C++ Ripser was 1.61–1.77× as fast on the sparse spheres and 1.55× as fast on the smaller dense sphere. Most planar requests and the larger dense sphere were closer, with the larger planar request over F₂ favoring C++ Ripser by a factor of 1.12.

On the 1,408-vertex circle, the complete request took 25.5 s in TamerOp and 48.8 s in C++ Ripser. On the 704-vertex sparse sphere, it took 69.7 s and 43.7 s. The timer includes reading the distance file, computing the barcode and emitting its intervals; Julia methods are already compiled.

All ten C++ Ripser comparisons, with the ratio of C++ time to TamerOp time and the range across process passes.

A ratio above one favors TamerOp: a value of 2 means it takes half as long. A ratio below one favors C++ Ripser. Markers average the ratios from three rounds of measurements using a geometric mean; lines span the smallest and largest ratio. These ranges show the observed variation between rounds.

Actual runtimes and input sizes

Times are in seconds. For each input, we average the two timings in each round, then take the middle of those three averages. F₂, F₃ and F₁₀₁ denote arithmetic modulo 2, 3 and 101. A degree label H₂ includes H₀, H₁ and H₂. All ten measured inputs appear below.

InputVerticesField / throughTamerOp (s)C++ Ripser (s)C++ / TamerOp time
Circle1,280F₂ / H₁15.528.61.83×
Circle1,408F₂ / H₁25.548.81.79×
Planar1,024F₂ / H₂31.728.70.962×
Planar1,152F₂ / H₂55.445.70.890×
Planar1,024F₁₀₁ / H₂38.537.40.944×
Planar1,152F₁₀₁ / H₂47.250.11.05×
Sphere448F₃ / H₂24.916.80.645×
Sphere512F₃ / H₂40.642.71.05×
Sparse sphere640F₂ / H₂49.828.00.565×
Sparse sphere704F₂ / H₂69.743.70.620×
Elapsed times for the larger input in each family and field, comparing TamerOp with C++ Ripser in seconds.

The plot selects the larger input from each family and field. It shows how the ratio translates into elapsed time, including the sparse sphere result favoring C++ Ripser. Reported ratios use the paired process medians. The time columns summarize each program separately, so dividing the displayed times need not give the reported ratio.

What the comparison computes

A Vietoris–Rips filtration adds an edge when its distance reaches the threshold and fills every clique with its simplex. Both programs return the complete barcode through the requested homology degree, including repeated intervals and classes that remain at the end of the filtration. TamerOp uses its direct ordinary persistence route, without constructing a finite encoding.

The inputs contain equally spaced circle points, random planar points in (-1,1)², or normalized Gaussian points on a sphere in R³. Their Euclidean distances are rounded to multiples of 1/4096, which both Float32 and Float64 represent exactly. The benchmark therefore computes persistence on the same supplied dissimilarities in both programs. The input definitions give the sizes, seeds and construction rules.

Sparse inputs retain only edges within the stated radius before either tool reads the graph. A class that remains at the end of such a filtration is essential in that restricted graph; later edges from the full point cloud could kill it. This common restriction matters because a separate small control exposed a cutoff error in this version of C++ Ripser's command line program. The four-vertex example and expected answer record that behavior. It is excluded from speed comparisons.

The Ripser.py report measures a different interface, which adds landmark selection and representative cocycles to its Python workflow. Here the requested result is the barcode alone, from a supplied distance file.

How the measurements were taken

Both programs start from the same text file. The timer includes reading the distances, building the input objects, computing the barcode and printing its intervals. C++ Ripser is launched for every call, and its launch time is included. TamerOp runs in an already loaded Julia session with its code compiled.

We ran three rounds of measurements. Each input starts a new Julia session in each round, with a preliminary run followed by two timed computations per program. Every computation rereads its input and calculates the barcode afresh. Input order reverses in the second round, and the programs alternate going first. The observation record retains the individual timings.

Matching the answers

Complete interval multisets agree by degree, including essential classes and multiplicities. The supplied grades are separated sufficiently that Ripser's printed endpoints decode uniquely to their original values; the harness rejects inputs whose values would become ambiguous when printed. Small controls additionally agree with an independent explicit boundary reduction, covering several fields, equal grades, a stored zero edge and a disconnected sparse component. See the verification record.

Computer, versions and memory

The study used the benchmark computer, with one computation thread per program and one program running at a time. Other work was running on the computer during this study; the plotted ranges show the variation between rounds.

ComponentRecorded version or setting
TamerOpThe same frozen source as the Ripser.py study
Julia1.12.1
C++ RipserUpstream commit 01add51ff64aaf40889483260cc5c3b7d0f2a1e7
Compilerg++ 11.4.0, with optimization enabled

Julia was configured to reclaim unused memory sooner, and each input ran in a separate Julia session. Earlier attempts without these changes exceeded the memory limit. The configuration record gives the settings and identifies the excluded runs.

TamerOp used more RAM. The largest amount recorded for each input ranged from 3.11 to 5.67 GB for TamerOp, compared with about 25 MB to 2.17 GB for C++ Ripser. These measurements cover the whole program: a Julia session includes setup and repeated computations of one input, while each C++ call runs separately. The data dictionary explains the measurements in the complete table.

Reproduce the results

Follow Reproduce a benchmark report to verify the records and regenerate the common figures. The study's principal files are:

RecordDownload
File and field descriptionsData dictionary
Full summary and paired ratiossummary.json · summary.csv
Individual observationsobservations.json
Mathematical checksverification.json · control checks
Inputs and timing protocolmanifest.json · fixtures.json
Software, harness and computersource hashes · harness hashes · machine and build
Integrity checksSHA256SUMS

The SHA-256 of summary.json is:

0ee767629be22d60dc77760cd654feba76b0983d4b8a512c343166a5dae8607d

The benchmark project provides the frozen TamerOp source, original measurement workers and input generator. Preparation checks out the pinned C++ source, builds its two coefficient variants and verifies the generated input hashes. The reproduction guide walks through checking the published records, rebuilding these figures and running a new comparison on your own machine.