Ear clipping walked every remaining vertex from the first after each ear,
re-reading a remembered verdict for most of them. It now keeps the set of
vertices whose verdict can have changed (an ear's two neighbors and the
vertices it blocked) and takes the lowest, which tests the same vertices
in the same order. The ear test reads the remaining vertices from packed
arrays, several at a time where the hardware allows, with the arithmetic
of PointInTriangle per lane. Working arrays are kept per thread.
ConvexHull sorts in a per-thread buffer with the position as tie-break,
the order the stable two-key LINQ sort gave. Shape flattening adds arc
points straight to the polygon; Arc's sweep, segment-count and point
arithmetic moved to static helpers so callers can flatten an arc without
building one.
A 246-vertex triangulation drops from about 410 to 115 microseconds.
Triangles, hulls and polygons are bit-identical: the existing frozen
ConvexDecomposition oracle tests pass, and new tests compare the hull and
the flattening with the earlier code.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>