morishuz
Joined 3 months ago
Joined 3 months ago
i’ve since reproduced the world dataset benchmark locally and found that polygon validation was taking about two-thirds of delaunay32’s time on the accepted inputs.
i’m the author of Delaunay32, a constrained delaunay triangulator with polygon and hole support. it uses divide-and-conquer rather than incremental insertion, so im curious how it would compare with the delaunay baseline here.
https://github.com/morishuz/delaunay32
i havent benchmarked on your corpus yet, and our current polygon api requires simple rings with non-touching holes. thanks for publishing the datasets, they look useful for testing and comparison!
Using that as the 1.0× baseline: • Delaunay32, one thread: ~2.8× runtime. • Fade2D, automatic threads: ~4.5×. • Fade2D, one thread: ~6×. • delaunator-cpp: ~11×. • Triangle: ~11×.
64bit integers works with an input coordinate range of 29,609. this is typically fine for raster image coordinates or floats that can allow for some quantization (only the triangles/edges are affected by this not the original points!)
if the input range is larger than 29,609, the algorithm switches to a 128bit implementation with a range of 1,940,470,527 which is close to, but still smaller than, what could theoretically be stored in an int32 value. hence that's why the input is currently only up to int32.
in theory it could be extended to 64bit input range but it comes with performance and portability trade-offs that currently don't seem worth it
At one million points, Delaunay32 takes about 147–150 ms with one thread versus 540–555 ms for delaunator-cpp on my machine, so roughly 3.7× faster. Automatic eight-thread mode Delaunay32 takes about 53–54 ms.
(i am the author of Delaunay32)
> Are vertex insertion and deletion also supported/accelerated?
no unfortunately not, since this is currently a fast batch triangulator, so vertex insertion/deletion requires rebuilding
>What compromises are keeping this constrained to 32-bit?
it isn’t SIMD-specific. the circle test involves squared coordinates and further multiplications. therefore, 32-bit coordinates inputs can already require 128-bit temporary results internally. Supporting 64-bit exactly would require roughly 256-bit intermediates and come at the cost of speed and portability, so i think 32bit is currently a good trade-off.