forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: include more fs.stat*() optimizations
Including: * Move async *stat() functions to FillStatsArray() now used by the sync *stat() functions * Avoid creating fs.Stats instances for implicit async/sync *stat() calls used in various fs functions * Store reference to Float64Array data on C++ side for easier/faster access, instead of passing from JS to C++ on every async/sync *stat() call Backport-PR-URL: nodejs#11665 Fixes: nodejs#16496
- Loading branch information
Showing
10 changed files
with
290 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
var common = require('../common.js'); | ||
var fs = require('fs'); | ||
|
||
var bench = common.createBenchmark(main, { | ||
n: [60e4] | ||
}); | ||
|
||
function main(conf) { | ||
var n = +conf.n; | ||
|
||
bench.start(); | ||
for (var i = 0; i < n; ++i) | ||
fs.readFileSync(__filename); | ||
bench.end(n); | ||
} |
Oops, something went wrong.