Compilation time increases too much with array's size
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 218
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 8
Description
### What is wrong?
The compiler takes too long (practically freezes) when compiling the following code:
```
contract Test {
pub fn foo(bar: Array) {}
}
```
I'm running the Mac version, with:
```
$ fe --version
fe 0.20.0-alpha
$ fe build --output-dir mytest test.fe
```
It does work with relatively small array sizes. But the bigger the array size, the longer it takes. To the point it's unusable for large ones. Some numbers:
|size|time|
|---|---|
|10|0.08 sec|
|100|0.48 sec|
|1000|30 sec|
|10000| killed after +30 min. |
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported case in test.fe with `fe build --output-dir mytest test.fe`, then compare compilation times as the Array size grows. The issue is complete when large arrays no longer make compilation unusably slow, while preserving compilation for the smaller examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100