I want to calculate the diameter of a convex polygon. That is, the largest distance between any pair of vertices. Here's my approach
pol = Polygon@{{-6.4, -8.3}, {-5.5, -9}, {-5, -8.4}, {-5, -7.9}, {-5.9, -7.6}};
vts = pol[[1]];
AbsoluteTiming@
Max@Table[Table[EuclideanDistance[vts[[i]], vts[[j]]],
{j, i + 1, Length@vts}], {i, Length@vts - 1}]
(* {0.000058, 1.45602} *)
What do you think? Is there a faster way of doing this?