mkdirSync,
readFileSync,
rmSync,
- writeFileSync
+ writeFileSync,
} = require('node:fs')
const { TaskFunctions } = require('./benchmarks-types.cjs')
const jsonIntegerSerialization = n => {
for (let i = 0; i < n; i++) {
const o = {
- a: i
+ a: i,
}
JSON.stringify(o)
}
}
/**
- * @param {number} n - The number of fibonacci numbers to generate.
- * @returns {number} - The nth fibonacci number.
+ * @param n - The number of fibonacci numbers to generate.
+ * @returns - The nth fibonacci number.
*/
const fibonacci = n => {
n = BigInt(n)
}
/**
- * @param {number} n - The number to calculate the factorial of.
- * @returns {number} - The factorial of n.
+ * @param n - The number to calculate the factorial of.
+ * @returns - The factorial of n.
*/
const factorial = n => {
if (n === 0 || n === 1) {
const filePath = `${baseDirectory}/${i}`
writeFileSync(filePath, i.toString(), {
encoding: 'utf8',
- flag: 'a'
+ flag: 'a',
})
readFileSync(filePath, 'utf8')
}
}
module.exports = {
- executeTaskFunction
+ executeTaskFunction,
}