Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: check for --prof in ParseArgs #2533

Closed
wants to merge 1 commit into from

Conversation

evanlucas
Copy link
Contributor

Previously, all of the cli arguments are parsed and then we loop
through the v8 arguments again. This patch removes the need for the
additional loop as we can check if the argument is --prof during the
initial ParseArgs.

Previously, all of the cli arguments are parsed and then we loop
through the v8 arguments again. This patch removes the need for the
additional loop as we can check if the argument is --prof during the
initial ParseArgs.
@evanlucas evanlucas added the c++ Issues and PRs that require attention from people who are familiar with C++. label Aug 25, 2015
@bnoordhuis
Copy link
Member

I guess I don't really see the point. The number of comparisons stays the same, right?

@evanlucas
Copy link
Contributor Author

The number of comparisons doesn't change, but it prevents the additional loop through v8_argv. I trust your opinion though, so if you think it is worthless, I can close :]

@bnoordhuis
Copy link
Member

I suspect it's basically a wash and possibly a pico-deoptimization. The loop counter probably lives in a register but v8_is_profiling is almost certainly reloaded from memory every time it's checked.

@evanlucas
Copy link
Contributor Author

works for me

@evanlucas evanlucas closed this Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants