Skip to content

fs: removed unused references#752

Closed
targos wants to merge 1 commit into
nodejs:v1.xfrom
targos:clean-fs
Closed

fs: removed unused references#752
targos wants to merge 1 commit into
nodejs:v1.xfrom
targos:clean-fs

Conversation

@targos

@targos targos commented Feb 7, 2015

Copy link
Copy Markdown
Member

No description provided.

@cjihrig

cjihrig commented Feb 7, 2015

Copy link
Copy Markdown
Contributor

@bnoordhuis Is there any overhead to having these unused arguments? If not, I'd say leave them. Otherwise, the change looks fine.

@targos

targos commented Feb 7, 2015

Copy link
Copy Markdown
Member Author

I proposed the change for more consistency with the rest of fs.js where the callbacks do not reference unused parameters

@bnoordhuis

Copy link
Copy Markdown
Member

I believe that mismatched parameter counts are less efficient because it forces the function call to go through an intermediate 'adapter' stack frame first. It probably also forces spilling all arguments to the stack instead of passing them in registers.

An adapter frame could perhaps be skipped when the callee's parameter count is less than that of the caller. I don't believe V8 applies any such optimizations, though.

@Fishrock123

Copy link
Copy Markdown
Contributor

@bnoordhuis is that something we need to investigate in more detail?

This is mostly a style-fix, so, closing for now.

@Fishrock123 Fishrock123 closed this Feb 9, 2015
@bnoordhuis

Copy link
Copy Markdown
Member

@Fishrock123 Not really, it's primarily a V8 issue.

@targos targos deleted the clean-fs branch April 30, 2015 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants