repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into worker-info
[poolifier.git]
/
benchmarks
/
benchmarks-utils.mjs
diff --git
a/benchmarks/benchmarks-utils.mjs
b/benchmarks/benchmarks-utils.mjs
index 9435b0d3acbf464337165292cdb6395691240241..d2f4fc23e344966f3acddd5fcb5048469fee418f 100644
(file)
--- a/
benchmarks/benchmarks-utils.mjs
+++ b/
benchmarks/benchmarks-utils.mjs
@@
-55,7
+55,7
@@
function jsonIntegerSerialization (n) {
* @param {number} n - The number of fibonacci numbers to generate.
* @returns {number} - The nth fibonacci number.
*/
* @param {number} n - The number of fibonacci numbers to generate.
* @returns {number} - The nth fibonacci number.
*/
-
export
function fibonacci (n) {
+function fibonacci (n) {
if (n <= 1) return n
return fibonacci(n - 1) + fibonacci(n - 2)
}
if (n <= 1) return n
return fibonacci(n - 1) + fibonacci(n - 2)
}
@@
-65,14
+65,14
@@
export function fibonacci (n) {
* @param {number} n - The number to calculate the factorial of.
* @returns {number} - The factorial of n.
*/
* @param {number} n - The number to calculate the factorial of.
* @returns {number} - The factorial of n.
*/
-
export
function factorial (n) {
+function factorial (n) {
if (n === 0) {
return 1
}
return factorial(n - 1) * n
}
if (n === 0) {
return 1
}
return factorial(n - 1) * n
}
-
export
function readWriteFiles (
+function readWriteFiles (
n,
baseDirectory = `/tmp/poolifier-benchmarks/${crypto.randomInt(
281474976710655
n,
baseDirectory = `/tmp/poolifier-benchmarks/${crypto.randomInt(
281474976710655