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

[SR-10437] Compile time is long when expression adds a negative #52837

Open
swift-ci opened this issue Apr 10, 2019 · 1 comment
Open

[SR-10437] Compile time is long when expression adds a negative #52837

swift-ci opened this issue Apr 10, 2019 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself performance type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10437
Radar None
Original Reporter jpratt (JIRA User)
Type Bug

Attachment: Download

Environment

Swift 5.0, Xcode 10.2.

To find the source of long compile times, I enabled the following flags under "Other Swift Flags" in Build Settings:

-Xfrontend -warn-long-function-bodies=100
-Xfrontend -warn-long-expression-type-checking=100

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Performance, TypeChecker
Assignee None
Priority Medium

md5: a88c4a9789ebea9517c32777b15bf095

Issue Description:

I have found a bug that increases compile times a great deal.

I saw long compile times when I used the negative operator in front

of a variable and added that variable. When I removed the negative

operator, and just subtracted the variable instead, compile times

returned to normal. The two screenshots show what happens.

@belkadan
Copy link
Contributor

cc @xedin

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself performance type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants