Skip to content

Commit

Permalink
lint: use obj shortland
Browse files Browse the repository at this point in the history
  • Loading branch information
puzrin committed Dec 1, 2023
1 parent af07dec commit 04f5585
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions benchmark/benchmark.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,23 @@ readdirSync(new URL('./samples', import.meta.url)).sort().forEach(sample => {
}

const suite = new Benchmark.Suite(title, {

onStart: function onStart () {
console.log('\nSample: %s %s', sample, title)
},

onComplete: onComplete

onStart: () => { console.log('\nSample: %s %s', sample, title) },
onComplete
})

IMPLS.forEach(function (impl) {
suite.add(impl.name, {

onCycle: function onCycle (event) {
onCycle: event => {
cursor.horizontalAbsolute()
cursor.eraseLine()
cursor.write(' > ' + event.target)
},

onComplete: onComplete,

fn: function () {
impl.code.run(content.string)
}
onComplete,
fn: () => { impl.code.run(content.string) }
})
})

SAMPLES.push({
name: sample.split('.')[0],
title: title,
content: content,
suite: suite
})
SAMPLES.push({ name: sample.split('.')[0], title, content, suite })
})

function select (patterns) {
Expand Down

0 comments on commit 04f5585

Please sign in to comment.