Array compression
Open
optimizer
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
If we have two arrays like `[a, b, c, d]` and `[c, d, e, f]`, then we could combine them into one array `[a, b, c, d, e, f]` and mess with the array indexes. This is an example of the shortest common superstring form of compression, but it may be fruitful to do more sophisticated things like run length encoding or LZ77. Architects might not like that we do these things automatically, so it may be good to have a hint provided when user-defined arrays are created. We'd also have to be careful to avoid converting array indexes into selects until after this optimization is done.
Contributor guide
Assessment
This issue has not been assessed yet.