3 ms·
Compiler-enforced computational complexity would be an interesting part of that experiment. Could be part of the function declaration, for example: void co
by qsort 5y ago
Compiler-enforced computational complexity would be an interesting part of that experiment. Could be part of the function declaration, for example:
void constanttime doStuff(vector<whatever> v)
However, it would likely require extensive dedicated support and would necessarily be limited (hello, halting problem!). I could see that working and be useful for common complexity values, e.g. O(n^k), O(log n) etc.