mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Refactor: Remove stale benchmark outputs
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
let _d3
|
||||
|
||||
async function findLISLength(a) {
|
||||
if (!Array.isArray(a)) throw new TypeError("Expected an array of numbers")
|
||||
|
||||
let { bisectLeft: b } = await (_d3 ||= import("https://cdn.jsdelivr.net/npm/d3-array@3/+esm"))
|
||||
let t = []
|
||||
|
||||
for (let x of a) t[b(t, x)] = x
|
||||
|
||||
return t.length
|
||||
}
|
||||
export default findLISLength;
|
||||
// Generation time: 9.821s
|
||||
// Result: PASS
|
||||
@@ -1,18 +0,0 @@
|
||||
const findLISLength = async arr => {
|
||||
if (!Array.isArray(arr)) throw new TypeError('Input must be an array');
|
||||
|
||||
const { bisectLeft } = await import(
|
||||
'https://cdn.jsdelivr.net/npm/d3-array@3.2.4/+esm'
|
||||
);
|
||||
|
||||
const tails = [];
|
||||
for (const v of arr) {
|
||||
const i = bisectLeft(tails, v);
|
||||
if (i === tails.length) tails.push(v);
|
||||
else tails[i] = v;
|
||||
}
|
||||
return tails.length;
|
||||
};
|
||||
export default findLISLength;
|
||||
// Generation time: 0.883s
|
||||
// Result: PASS
|
||||
@@ -1,15 +0,0 @@
|
||||
const findLISLength = async nums => {
|
||||
const { bisectLeft } = await import('https://esm.sh/d3-array')
|
||||
const tails = []
|
||||
|
||||
for (const n of nums) {
|
||||
const i = bisectLeft(tails, n)
|
||||
if (i === tails.length) tails.push(n)
|
||||
else tails[i] = n
|
||||
}
|
||||
|
||||
return tails.length
|
||||
}
|
||||
export default findLISLength;
|
||||
// Generation time: 197.616s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user