fesoliveira014 / voronator-rs

Delaunay triangulation and Voronoi diagram generation. Ported from Mapbox's Delaunator and d3-voronoi
MIT License
53 stars 13 forks source link

~2x speed improvement using rayon for parallel computation #11

Closed AlanRace closed 2 years ago

AlanRace commented 2 years ago

Some aspects of the Voronoi generation process lend themselves to parallel computation, so I added rayon to use parallel iterators. This provided an approximately 2x speed increase in generating a Voronoi diagram for 160714 points in my test case. The majority of the time is now spent in triangulation.

fesoliveira014 commented 2 years ago

This looks very good, thanks a lot for your contributions! This also closes #5, so I will be closing that issue as well.

Since adding trait changes the calling API for VoronoiDiagram, I will also bump the version to 0.2.0 in a different commit.