Docs: Update benchmark for z-ai/glm-5

This commit is contained in:
github-actions[bot]
2026-02-12 00:32:22 +00:00
parent bff6d5226e
commit 91aa46a299
12 changed files with 216 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
const findConvexHull = async points => {
const { sortBy, uniqWith, isEqual } = await import('https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/lodash.js');
if (points.length <= 2) return uniqWith(points, isEqual);
const cross = (o, a, b) => (a.x - o.x) * (b.y - o.y) - (a.y - o.y) * (b.x - o.x);
const sorted = sortBy(points, ['x', 'y']);
const build = pts => {
const h = [];
for (const p of pts) {
while (h.length > 1 && cross(h.at(-2), h.at(-1), p) <= 0) h.pop();
h.push(p);
}
return h;
};
const lower = build(sorted);
const upper = build(sorted.reverse());
lower.pop();
upper.pop();
return uniqWith([...lower, ...upper], isEqual);
};
export default findConvexHull;
// Generation time: 122.181s
// Result: PASS