mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Docs: Update benchmark results
This commit is contained in:
17
tests/3_lis/outputs/anthropic_claude-sonnet-4.5 TEMP_0.4.js
Normal file
17
tests/3_lis/outputs/anthropic_claude-sonnet-4.5 TEMP_0.4.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const findLISLength = async (arr) => {
|
||||
if (!arr?.length) return 0;
|
||||
|
||||
const { bisectLeft } = await import('https://cdn.skypack.dev/d3-array');
|
||||
|
||||
const tails = [];
|
||||
|
||||
for (const num of arr) {
|
||||
const pos = bisectLeft(tails, num);
|
||||
tails[pos] = num;
|
||||
}
|
||||
|
||||
return tails.length;
|
||||
};
|
||||
|
||||
export default findLISLength;
|
||||
export default findLISLength;
|
||||
15
tests/3_lis/outputs/anthropic_claude-sonnet-4.5 TEMP_0.7.js
Normal file
15
tests/3_lis/outputs/anthropic_claude-sonnet-4.5 TEMP_0.7.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const findLISLength = async (arr) => {
|
||||
if (!arr?.length) return 0;
|
||||
|
||||
const { bisectLeft } = await import('https://cdn.skypack.dev/d3-array');
|
||||
|
||||
const tails = [];
|
||||
|
||||
for (const num of arr) {
|
||||
const pos = bisectLeft(tails, num);
|
||||
tails[pos] = num;
|
||||
}
|
||||
|
||||
return tails.length;
|
||||
};
|
||||
export default findLISLength;
|
||||
15
tests/3_lis/outputs/anthropic_claude-sonnet-4.5.js
Normal file
15
tests/3_lis/outputs/anthropic_claude-sonnet-4.5.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const findLISLength = async (nums) => {
|
||||
const { bisectLeft } = await import('https://cdn.skypack.dev/d3-array');
|
||||
|
||||
if (!nums?.length) return 0;
|
||||
|
||||
const tails = [];
|
||||
|
||||
for (const num of nums) {
|
||||
const idx = bisectLeft(tails, num);
|
||||
tails[idx] = num;
|
||||
}
|
||||
|
||||
return tails.length;
|
||||
};
|
||||
export default findLISLength;
|
||||
14
tests/3_lis/outputs/google_gemini-2.5-pro TEMP_0.4.js
Normal file
14
tests/3_lis/outputs/google_gemini-2.5-pro TEMP_0.4.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const findLISLength = async (nums) => {
|
||||
if (!nums?.length) return 0;
|
||||
|
||||
const { bisectLeft } = await import('https://cdn.jsdelivr.net/npm/d3-array@3/+esm');
|
||||
|
||||
const tails = [];
|
||||
|
||||
for (const num of nums) {
|
||||
tails[bisectLeft(tails, num)] = num;
|
||||
}
|
||||
|
||||
return tails.length;
|
||||
};
|
||||
export default findLISLength;
|
||||
13
tests/3_lis/outputs/google_gemini-2.5-pro TEMP_0.7.js
Normal file
13
tests/3_lis/outputs/google_gemini-2.5-pro TEMP_0.7.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const findLISLength = async (nums) => {
|
||||
if (!nums?.length) return 0;
|
||||
|
||||
const { bisectLeft } = await import('https://cdn.jsdelivr.net/npm/d3-array@3/+esm');
|
||||
const tails = [];
|
||||
|
||||
for (const num of nums) {
|
||||
tails[bisectLeft(tails, num)] = num;
|
||||
}
|
||||
|
||||
return tails.length;
|
||||
};
|
||||
export default findLISLength;
|
||||
13
tests/3_lis/outputs/google_gemini-2.5-pro.js
Normal file
13
tests/3_lis/outputs/google_gemini-2.5-pro.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const findLISLength = async (nums) => {
|
||||
if (!Array.isArray(nums) || !nums.length) return 0;
|
||||
|
||||
const { bisectLeft } = await import("https://cdn.jsdelivr.net/npm/d3-array");
|
||||
const tails = [];
|
||||
|
||||
for (const num of nums) {
|
||||
tails[bisectLeft(tails, num)] = num;
|
||||
}
|
||||
|
||||
return tails.length;
|
||||
};
|
||||
export default findLISLength;
|
||||
14
tests/3_lis/outputs/openai_gpt-5-codex.js
Normal file
14
tests/3_lis/outputs/openai_gpt-5-codex.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const loadBisectLeft=(()=>{let cache;return()=>cache||(cache=import('https://cdn.jsdelivr.net/npm/d3-array@3/+esm').then(({bisectLeft})=>bisectLeft));})();
|
||||
export async function findLISLength(nums){
|
||||
if(!Array.isArray(nums)) throw new TypeError('Expected an array');
|
||||
if(!nums.length) return 0;
|
||||
const bisectLeft=await loadBisectLeft();
|
||||
const tails=[];
|
||||
for(const value of nums){
|
||||
if(!Number.isFinite(value)) throw new TypeError('Array must contain only finite numbers');
|
||||
const index=bisectLeft(tails,value,0,tails.length);
|
||||
tails[index]=value;
|
||||
}
|
||||
return tails.length;
|
||||
}
|
||||
export default findLISLength;
|
||||
Reference in New Issue
Block a user