tc: exp-time whilst running analysis on this chunk
- Dominant language
- Rust
- Stars
- 28
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The following snippet (with the addition of more `+ 1`) causes the compiler to exhibit exponential compile times (specifically in the analysis phase).
```rust
main := () => {
y := 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1;
} // 170ms
```
The above snippet took `170ms` to evaluate, and the one below took `310ms`, and the one after `600ms`:
```rust
main := () => {
y := 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1;
} // 310ms
```
```rust
main := () => {
y := 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
1 + 1;
} // 600ms
```
Contributor guide
Assessment
This issue has not been assessed yet.