Skip to content

astutils.h: removed unnecessary std::stack usage from visitAstNodes() #7569

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

firewave
Copy link
Collaborator

@firewave firewave commented Jun 3, 2025

saves about 10% of Ir

@firewave
Copy link
Collaborator Author

firewave commented Jun 3, 2025

Since std::stack is just an adaptor (i.e. wrapper which limits functionality) there is no actual value over just using the underlying container directly (which we already modifying for performance reasons).

@chrchr-github chrchr-github merged commit 20dbc8d into danmar:main Jun 4, 2025
53 checks passed
@firewave firewave deleted the ast-stack branch June 4, 2025 08:01
@firewave
Copy link
Collaborator Author

firewave commented Jun 4, 2025

It is possible this might not have had any effect on performance at all. The builds I was testing with seemed to not have been optimized in part...

@firewave
Copy link
Collaborator Author

firewave commented Jun 4, 2025

It is possible this might not have had any effect on performance at all. The builds I was testing with seemed to not have been optimized in part...

That is indeed the case. It seemed weird that this never came up before given the visibility of that function ...

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.

2 participants