Here I'd like to show an example of runtime complexity, arising from a practical problem.
A question in compiler design is: what optimizations should a given compiler perform? Optimizations for functional languages in particular are not well-known; it is not obvious which optimizations will provide the greatest speedup on user code.
The totient function is defined for positive integers as:
As you may know, I have been working on polyglot for some time now. It is now the second-most popular ATS project on github0 and it has reached a state of relative maturity.next