Closed waldyrious closed 6 years ago
On the other hand, since the JavaScript benchmark seems to be running on top of Node.js, writing to a file is actually possible with the fs
module. A synchronous version would look like this:
const fs = require('fs');
function printfd(n) {
let f = fs.openSync("/dev/null", "w");
for (let i = 1; i <= n; i++) {
fs.writeSync(f, `${i} ${i + 1}\n`);
}
fs.closeSync(f);
}
Wouldn't it be preferable to have this data point? :)
fixed by PR #12
From this comment: