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-1707] Compiling takes too long when summing arrays of Int #44316

Closed
swift-ci opened this issue Jun 8, 2016 · 2 comments
Closed

[SR-1707] Compiling takes too long when summing arrays of Int #44316

swift-ci opened this issue Jun 8, 2016 · 2 comments
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

swift-ci commented Jun 8, 2016

Previous ID SR-1707
Radar None
Original Reporter kprcela (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

iOS 9, XCode 7.3.1
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9

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

md5: 220ba8b6ff9d01bd6d02ecc5fd270d52

Issue Description:

Consider following example:

var sum = [1,2]+[3,4]+[5,6]+[7,8]+[9,10]

The compiler will make a error:
Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions

That is ok.

But, the following example:

 let a=[1,2]
 let b=[3,4]
 let c=[5,6]
 let d=[7,8]
 let e=[9,10]
            
 var sum = a+b+c+d+e

The compiler will NOT make a error and the compiling time will silently take an about a minute.

@swift-ci
Copy link
Collaborator Author

Comment by Abdullah Abanmi (JIRA)

resolved in xcode 8 (tested in xcode8b6 w/ swift 3)

var sum = [1,2]+[3,4]+[5,6]+[7,8]+[9,10]

@swift-ci
Copy link
Collaborator Author

Comment by Abdullah Abanmi (JIRA)

resolved in Xcode 8 beta 6.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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

1 participant