Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use slice implementation for contour construction
Replace list-based approach with bi-directional slice-based approach suggested by Egon Elbre. Also add complete graph-based analysis for contour path reconstruction with optimisation checks for simple or no-work cases. Comparison between list and current path reconstruction: benchmark old ns/op new ns/op delta BenchmarkComplexContour0 12813961 6131752 -52.15% BenchmarkComplexContour1 23735387 10794846 -54.52% BenchmarkComplexContour2 36366033 17146897 -52.85% BenchmarkComplexContour4 57171163 29761464 -47.94% BenchmarkComplexContour8 107407179 58964940 -45.10% BenchmarkComplexContour16 181637216 112427754 -38.10% BenchmarkComplexContour32 293213592 175411602 -40.18% A naive plotting option is retained to allow debugging.
- Loading branch information