Re:Implementing Algebraic Effects in C
by adrianN on Monday July 31, 2017 @07:20AM
(#14890922)
That would be a very restrictive programming environment, or type checking might fail or produce ridiculously large runtime bounds. It is not decidable whether a given Turing machine has runtime O(n^k) for a particular k, even if you're given the promise that such a k exists.
[ Parent
| on HN ]
Could you make it an attribute of the symbol being exported, part of the contract, and use that to derive an estimated cost of the program?
I could see this being used to choose between allocators or schedulers given specific requirements.