-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Closed
Copy link
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfexpressionsFeature: expressionsFeature: expressionsliteralsFeature → expressions: Literals such as an integer or string literalFeature → expressions: Literals such as an integer or string literalperformanceswift 4.2type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
| Previous ID | SR-7632 |
| Radar | rdar://problem/29358447 |
| Original Reporter | andreasw (JIRA User) |
| Type | Bug |
| Status | Closed |
| Resolution | Done |
Environment
Ubuntu 17.10, Swift 4.1, Dell Latitude
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug |
| Assignee | andreasw (JIRA) |
| Priority | Medium |
md5: c140d89b8695a1d83b04eca03543c3fc
Issue Description:
Compilation of
let x = [0, 1, 2, 3, ..., 2000]takes >4 seconds on my laptop.
The same in C++ with clang takes less than 0.2 seconds.
int x[] = {0, 1, 2, 3, ..., 2000}It gets worse with 5.000 or 20.000 elements, numbers that are not unusual when working with large predefined matrices.
I generated the elements with bash:
seq -s, 2000Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfexpressionsFeature: expressionsFeature: expressionsliteralsFeature → expressions: Literals such as an integer or string literalFeature → expressions: Literals such as an integer or string literalperformanceswift 4.2type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis