Skip to content

Conversation

@slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Sep 22, 2025

I went through the backlog of type checker performance bugs and reduced some test cases. Some are still slow, others were fixed a while ago, and a few were fixed in 6.2 or main.

Now fast:

Still slow:

@slavapestov slavapestov force-pushed the reasonable-time-tests branch 2 times, most recently from d38b3ec to f2c9c21 Compare September 22, 2025 23:04
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

func slow() {
let _ =
(0x0041...0x005A).stringValue + // 'A' to 'Z'
(0x0061...0x007A).stringValue + // 'a' to 'z'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this might be a good candidate for a scale test as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, I thought it was interesting that it had two string literals in the middle too :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we can keep that but do the loops in-between maybe?

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you!

Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible for one of these to regress and become 10x slower without reaching the scope limit or affecting scope increase linearity?

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@slavapestov slavapestov merged commit 03a58c2 into swiftlang:main Sep 23, 2025
4 of 5 checks passed
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.

3 participants