Skip to content

AST: Remove some unnecessary getCanonicalType() calls #8044

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
Mar 13, 2017

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@rjmccall
Copy link
Contributor

It's quite a bit faster to do some of these manipulations on canonical types; getAs<> expands to a lot of code. The queries on SILType, at least, seem like they ought to stay optimized.

@slavapestov
Copy link
Contributor Author

Really? The set of operations that were "optimized" in this manner were completely arbitrary and the "optimized" getNominalParent() was even wrong.

I think we will get better performance wins by reworking the expression type checker and SIL optimizer, not hunting for small micro optimization like this.

@slavapestov slavapestov merged commit b6e503d into swiftlang:master Mar 13, 2017
@rjmccall
Copy link
Contributor

Slava, micro performance isn't in opposition with macro performance. And yes, we didn't have optimized access paths for literally everything; I don't see why that's an argument against having optimized access paths for anything. You just seem to have launched onto a random crusade against getCanonicalType().

And how was getNominalParent() wrong?

@rjmccall
Copy link
Contributor

@slavapestov and I talked about this, and I've submitted #8080 to revert most of these changes.

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