Eliminating bignums by leveraging space unsafety
Open
enhancement
high effort
low reward
performance
uncertain scope
- Dominant language
- Standard ML
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 16
Description
COUNT_LIST is a fairly hot function in the current compiler (a different issue, but let's pretend it's desired). It is compiled with bignum support, but a human can easily see that bignums aren't actually reachable there: the numbers represent elements in a list that exists, and memory will always be exhausted before the largest representable number is reached. Can we automate this reasoning in any way? Does any existing ML implementation do such reasoning?
Any such optimization would need to be fairly late since it needs to assume no deforestation-type optimization will run subsequently.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.