aboutsummaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorUri Shaked2021-08-15 19:49:16 +0300
committerUri Shaked2021-08-15 19:49:16 +0300
commit3245a950539f49186fefedf09477f014659fadd7 (patch)
tree1f0b836e06d13cb7cd6e7698c132c5a6283075c7 /benchmark
parent0.16.6 (diff)
downloadavr8js-3245a950539f49186fefedf09477f014659fadd7.tar.gz
avr8js-3245a950539f49186fefedf09477f014659fadd7.tar.bz2
avr8js-3245a950539f49186fefedf09477f014659fadd7.zip
chore(deps): prettier 2.3.2
also reformat all the code with the new version
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/benchmark.ts2
-rw-r--r--benchmark/convert-instructions.ts9
2 files changed, 4 insertions, 7 deletions
diff --git a/benchmark/benchmark.ts b/benchmark/benchmark.ts
index eecce31..b99aa06 100644
--- a/benchmark/benchmark.ts
+++ b/benchmark/benchmark.ts
@@ -102,7 +102,7 @@ export function createBenchmark(benchmarkName: string): Benchmark {
return profile;
} as Benchmark;
- benchmark.report = function(fn?: (report: string) => void) {
+ benchmark.report = function (fn?: (report: string) => void) {
const fastest = profiles.reduce((previous: Profile, current: Profile) => {
return previous.bestTime < current.bestTime ? previous : current;
});
diff --git a/benchmark/convert-instructions.ts b/benchmark/convert-instructions.ts
index 9ddd058..edde3cc 100644
--- a/benchmark/convert-instructions.ts
+++ b/benchmark/convert-instructions.ts
@@ -28,10 +28,7 @@ function isTwoWordInstruction(opcode: number) {
const patternToFn: Array<[string, string]> = [];
for (const line of input.split('\n')) {
if (line.startsWith(' /* ') && line.includes(', ')) {
- currentInstruction = line
- .trim()
- .split(',')[0]
- .split(' ')[1];
+ currentInstruction = line.trim().split(',')[0].split(' ')[1];
fnBody = '';
pattern = line.split(',')[1].split('*')[0];
console.log(currentInstruction);
@@ -75,9 +72,9 @@ export function executeInstruction(idx: number, cpu: ICPU, opcode: number) {
const formattedOutput = prettier.format(output, {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
...(prettierOptions as any),
- parser: 'babel'
+ parser: 'babel',
});
fs.writeFileSync('benchmark/instruction-fn.ts', formattedOutput, {
- encoding: 'utf-8'
+ encoding: 'utf-8',
});