fs: improve error performance of writevSync - #50038
Conversation
|
Feel free to suggest improvements in the benchmark file |
|
Afaik in c++ returning a value is slower than modifying a variable passed as parameter (by ref). |
There was a problem hiding this comment.
Please add an invalid type to benchmarks
There was a problem hiding this comment.
@anonrig I would appreciate help creating a good bench script for my first PR 🙏
There was a problem hiding this comment.
In order to remove dead code elimination store the result of this operation and assert it when the benchmark finishes.
|
Did you swap the old and new node binary parameters when comparing the benchmarks or is that actually a 58% performance regression? |
c522003 to
1f60944
Compare
|
FWIW the changes currently result in: I'm guessing this should instead be more about improving the error case? |
1f60944 to
3c2e4ad
Compare
There was a problem hiding this comment.
We don't need a try/catch on valid part
There was a problem hiding this comment.
This is not a file descriptor. The variable name suggests fd
3c2e4ad to
2a2ca8b
Compare
2a2ca8b to
4babf4d
Compare
|
Landed in bf0f078 |
PR-URL: #50038 Refs: nodejs/performance#106 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: nodejs#50038 Refs: nodejs/performance#106 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Local benchmark:
Ref: nodejs/performance#106