Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-18 23:31:52 +00:00
parent 341252fec1
commit 5855cf8a6f
76 changed files with 967 additions and 1046 deletions
@@ -0,0 +1,20 @@
const findConvexHull = async (pts) => {
const { sortBy: S, uniqWith: U, isEqual: E } = await import('https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/+esm')
const p = S(U(pts, E), ['x', 'y'])
if (p.length < 3) return p
const X = (a, b, o) => (a.x - o.x) * (b.y - o.y) - (a.y - o.y) * (b.x - o.x)
const B = (list) => {
const h = []
for (const pt of list) {
while (h.length >= 2 && X(h[h.length - 1], pt, h[h.length - 2]) <= 0) h.pop()
h.push(pt)
}
return h
}
const l = B(p)
const u = B(p.reverse())
l.pop()
u.pop()
return l.concat(u)
}
export default findConvexHull;