Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Performance Comparison

Benchmark projects are:

All benchmarks were executed on the following machine:
3 GHz 6-Core Intel Core i5, 40GB 2667 MHz DDR4

All results are presented in microseconds (10⁻⁶ sec).

Each test was repeated multiple times, and the average result is shown.

All input shapes are clean (non-self-intersecting), and the logic was optimized to achieve maximum performance.

Solvers

  • iTriangle (Earcut64, Rust) v0.36.3 — raw triangulation, no holes, limited to ≤64 points, validation disabled
  • iTriangle (Monotone, Rust) v0.36.3 — raw triangulation, validation disabled
  • iTriangle (Delaunay, Rust) v0.36.3 — Delaunay triangulation, validation disabled
  • MapBox (Earcut Rust) v0.5.0 – Rust port – raw triangulation, validation disabled
  • MapBox (Earcut C++) v2.2.4 – C++ official – raw triangulation, validation disabled
  • Triangle (Delaunay C) v1.6 – C official - constrained Delaunay triangulation, validation disabled

Star Test

Star triangulation benchmarkInput contour and triangulation edges for the benchmark.

Raw

CountEarcut64MonotoneEarcut RustEarcut C++
80.30.50.730.42
160.661.61.230.5
321.63.92.61.2
644.68.355.63.3
128-17.812.68.4
256-37.529.122.9
512-79.780.772.7
1024-172259209
2048-388736641
4096-89831582804
8192-18241343511479
16384-38465168844017

Delaunay

CountiTriangleTriangle
80.464.3
161.08.3
322.525
646.65130
12819.7271
25640.5523
51285.91006
10241941704
20484242828
40969874806
819220748581
16384453316384

Spiral Test

Spiral triangulation benchmarkInput contour and triangulation edges for the benchmark.

Raw

CountEarcut64MonotoneEarcut RustEarcut C++
80.350.70.770.42
161.21.41.660.77
324.03.06.253.4
6415.46.218.619.8
128-12.871.666
256-26.7295306
512-55.512301438
1024-12053017595
2048-2792268250140
4096-68596933376060
8192-14354169433.7kk
16384-3080181214743.4kk

Delaunay

CountiTriangleTriangle
80.513.2
161.548.7
324.721.5
6416.935.6
12815.066.9
25629.7166
51262.2340
1024139728
20483131469
409673582948
819214426609
16384346313863

Star with Hole Test

Star with one hole triangulation benchmarkInput contour and triangulation edges for the benchmark.

Raw

CountMonotoneEarcut RustEarcut C++
12812.131.930.2
25622.486.678.8
51242.3227222
102484.4650593
204817420531825
409633371025702
81927552619722390
16384163610287480154

Delaunay

CountiTriangleTriangle
12816.8201
25632.8410
51261.6808
10241211616
20482503055
40965056410
8192140112919
16384409330704

Star with 8 holes Test

Star with eight holes triangulation benchmarkInput contour and triangulation edges for the benchmark.

Raw

CountMonotoneEarcut RustEarcut C++
25619.311743
51230.3260107
102453.7437270
20481075018576
4096200405961517
81923881562873802
1638479727356712687

Delaunay

CountiTriangleTriangle
25623.7330
51241.6546
102471.4951
20481431777
40962763398
81925676921
16384153913748