Docs: Update benchmark for moonshotai/kimi-k2.7-code

This commit is contained in:
github-actions[bot]
2026-06-19 23:28:58 +00:00
parent 49dadb5155
commit c263572691
12 changed files with 381 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
let l;
export const findConvexHull = async p => {
if (!Array.isArray(p)) throw new TypeError("points must be an array");
if (p.length < 2) return [...p];
l = l || import("https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/+esm");
const { sortBy: m, uniqWith: u } = await l;
const q = u(m(p, [o => o.x, o => o.y]), (a, b) => a.x === b.x && a.y === b.y);
const n = q.length;
if (n < 4) return q;
const c = (o, a, b) => (a.x - o.x) * (b.y - o.y) - (a.y - o.y) * (b.x - o.x);
const h = [];
for (let i = 0; i < n; h.push(q[i++]))
while (h.length > 1 && c(h[h.length - 2], h[h.length - 1], q[i]) <= 0) h.pop();
const t = h.length + 1;
for (let i = n - 1; i >= 0; h.push(q[i--]))
while (h.length > t && c(h[h.length - 2], h[h.length - 1], q[i]) <= 0) h.pop();
h.pop();
return h;
};
export default findConvexHull;
// Generation time: 26.432s
// Result: FAIL