Benchmarks | C++

Overview

Performance comparisons against VTK, CGAL, libigl, Coal, FCL, and nanoflann.

TrueForm enables real-time geometric operations on million-polygon meshes. On a pair of 1M-polygon meshes, boolean union completes in 28ms and intersection curve extraction in 7ms. Try it live in your browser →

These benchmarks quantify performance against established libraries across spatial indexing, topology analysis, intersection computation, and mesh cutting.

Experimental Setup

PropertyValue
CPUApple M4 Max (12P + 4E cores)
Memory64 GB
CompilerClang with -O3 -march=native
Allocatormimalloc
Test DataStanford Dragon, 58K–1M polygons (contains non-manifold flaps)
Sampling10–1000 evaluations per configuration

Construction benchmarks use 10 runs; query benchmarks use 1000. All libraries use parallel execution where available. For sub-millisecond queries, mean time is reported; for longer operations, minimum time is reported to reduce noise from OS scheduling. Source code →

Summary

Sample comparisons against VTK, CGAL, libigl, Coal, FCL, and nanoflann:

OperationInputTimeSpeedupBaselineTrueForm
Boolean Union2 × 1M28 ms84×CGAL Simple_cartesian<double>reduction diagrams, double
Mesh–Mesh Curves2 × 1M7 ms233×CGAL Simple_cartesian<double>reduction diagrams, double
Self-Intersection1M78 ms37×libigl EPECK (GMP/MPFR)reduction diagrams, double
Isocontours1M, 16 cuts3.8 ms38×VTK vtkContourFilterreduction diagrams, float
Connected Components1M15 ms10×CGALparallel union-find
Boundary Paths1M12 ms11×CGALHierholzer's algorithm
k-NN Query500K1.7 µsnanoflann k-d treeAABB tree
Mesh–Mesh Distance2 × 1M0.2 msCoal (FCL) OBBRSSOBBRSS tree
Principal Curvatures1M25 ms55×libiglparallel k-ring quadric fitting
To learn more about the reduction diagrams and the theoretical foundations of trueform, see our Research.

Detailed Results

Explore full benchmark charts and scaling analysis for each module:

Spatial

AABB tree construction, k-NN queries, and mesh–mesh distance.

Topology

Connected component extraction and boundary path detection.

Geometry

Curvature estimation and geometric analysis.

Intersect

Isocontour extraction and mesh–mesh intersection curves.

Cut

Boolean operations, self-intersection detection, and curve embedding.

I/O

File reading and writing performance.

Running Benchmarks

Dependencies

brew install boost gmp mpfr libccd tbb assimp libomp

Comparison Libraries

CGAL, libigl, FCL, Coal, and nanoflann are fetched automatically via CMake FetchContent.

VTK is optional due to its size. Install it separately to include VTK benchmarks; otherwise they are skipped.

brew install vtk

Build and Run

cmake -B build -DTF_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel --target benchmarks
./build/run-benchmarks

Results are written to build/results/. Use consolidate_results.py to merge per-library CSVs.